<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Cheetah Software: Simulation.cpp Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Cheetah Software
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
      <li><a href="../../globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('db/d98/_simulation_8cpp_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Simulation.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../db/d98/_simulation_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d2/ded/_simulation_8h.html">Simulation.h</a>&quot;</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d3/dc7/_quadruped_8h.html">Dynamics/Quadruped.h</a>&quot;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;ParamHandler.hpp&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;Configuration.h&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="../../de/d5e/_game_controller_8h.html">include/GameController.h</a>&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;unistd.h&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;fstream&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">// if DISABLE_HIGH_LEVEL_CONTROL is defined, the simulator will run freely,</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">// without trying to connect to a robot</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">//#define DISABLE_HIGH_LEVEL_CONTROL</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="../../dd/d14/class_simulation.html#a6bf59d648bef2114a09ea3d81998ee3e">   18</a></span>&#160;<a class="code" href="../../dd/d14/class_simulation.html#a6bf59d648bef2114a09ea3d81998ee3e">Simulation::Simulation</a>(<a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39">RobotType</a> robot, <a class="code" href="../../de/d6f/class_graphics3_d.html">Graphics3D</a>* window,</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;                       <a class="code" href="../../da/dcf/class_simulator_control_parameters.html">SimulatorControlParameters</a>&amp; params, <a class="code" href="../../d8/d86/class_control_parameters.html">ControlParameters</a>&amp; userParams)</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    : _simParams(params), _userParams(userParams), _tau(12) {</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;  <span class="comment">// init parameters</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;  printf(<span class="stringliteral">&quot;[Simulation] Load parameters...\n&quot;</span>);</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;      .<a class="code" href="../../d8/d86/class_control_parameters.html#a8f614fa95d472922d65efe48238a7afc">lockMutex</a>();  <span class="comment">// we want exclusive access to the simparams at this point</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;  <span class="keywordflow">if</span> (!<a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#a12b144b3d659080b6e0bfd93569b566e">isFullyInitialized</a>()) {</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    printf(</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        <span class="stringliteral">&quot;[ERROR] Simulator parameters are not fully initialized.  You forgot: &quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        <span class="stringliteral">&quot;\n%s\n&quot;</span>,</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#a6fc860c65c6484562dfc922cb5806410">generateUnitializedList</a>().c_str());</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;simulator not initialized&quot;</span>);</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  }</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  <span class="comment">// init LCM</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.sim_state_lcm) {</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    printf(<span class="stringliteral">&quot;[Simulation] Setup LCM...\n&quot;</span>);</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a631f7ffcbbba9b636bf851093c825739">_lcm</a> = <span class="keyword">new</span> lcm::LCM(<a class="code" href="../../de/df0/utilities_8h.html#aa3945f023f4c554ec5670ac03ff82525">getLcmUrl</a>(<a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.sim_lcm_ttl));</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="../../dd/d14/class_simulation.html#a631f7ffcbbba9b636bf851093c825739">_lcm</a>-&gt;good()) {</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;      printf(<span class="stringliteral">&quot;[ERROR] Failed to set up LCM\n&quot;</span>);</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;      <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;lcm bad&quot;</span>);</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    }</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  }</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;  <span class="comment">// init quadruped info</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;  printf(<span class="stringliteral">&quot;[Simulation] Build quadruped...\n&quot;</span>);</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> = robot;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#af713a3529e71a04c0b832dd2e10591fb">_quadruped</a> = <a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a> ? buildMiniCheetah&lt;double&gt;()</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;                                                 : buildCheetah3&lt;double&gt;();</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;  printf(<span class="stringliteral">&quot;[Simulation] Build actuator model...\n&quot;</span>);</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#af1e50315d809d3306564abf7225f6864">_actuatorModels</a> = <a class="code" href="../../dd/d14/class_simulation.html#af713a3529e71a04c0b832dd2e10591fb">_quadruped</a>.<a class="code" href="../../dc/d66/class_quadruped.html#a44aa07cf91c50c3d0e78821ccc620ccc">buildActuatorModels</a>();</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a> = window;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  <span class="comment">// init graphics</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>) {</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    printf(<span class="stringliteral">&quot;[Simulation] Setup Cheetah graphics...\n&quot;</span>);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <a class="code" href="../../d9/d8e/cpp_types_8h.html#a738072d0d6a7a632be68f6261501826b">Vec4&lt;float&gt;</a> truthColor, seColor;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    truthColor &lt;&lt; 0.2, 0.4, 0.2, 0.6;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    seColor &lt;&lt; 0.4, 0.2, 0.2, 0.6;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a4cfbfd15921d8e09ab67d6149425061b">_simRobotID</a> = <a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a> ? window-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#a49c53912e2868ee7d93cb0a3ed6d0f4b">setupMiniCheetah</a>(truthColor, <span class="keyword">true</span>)</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;                                                    : window-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#a2ded7e2e203f7d660f4120e0b9e3ed61">setupCheetah3</a>(truthColor, <span class="keyword">true</span>);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#acd45041ed9262293f92d7928342ca4da">_controllerRobotID</a> = <a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a></div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;                             ? window-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#a49c53912e2868ee7d93cb0a3ed6d0f4b">setupMiniCheetah</a>(seColor, <span class="keyword">false</span>)</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                             : window-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#a2ded7e2e203f7d660f4120e0b9e3ed61">setupCheetah3</a>(seColor, <span class="keyword">false</span>);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  }</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  <span class="comment">// init rigid body dynamics</span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  printf(<span class="stringliteral">&quot;[Simulation] Build rigid body model...\n&quot;</span>);</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a0965cd3e2bce1b7ee1ce3f7f6d752444">_model</a> = <a class="code" href="../../dd/d14/class_simulation.html#af713a3529e71a04c0b832dd2e10591fb">_quadruped</a>.<a class="code" href="../../dc/d66/class_quadruped.html#ae3725898959888f0885981c43f127a07">buildModel</a>();</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a33a669431e116d1e6c59af5a4a4ad9bf">_robotDataModel</a> = <a class="code" href="../../dd/d14/class_simulation.html#af713a3529e71a04c0b832dd2e10591fb">_quadruped</a>.<a class="code" href="../../dc/d66/class_quadruped.html#ae3725898959888f0885981c43f127a07">buildModel</a>();</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a> =</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;      <span class="keyword">new</span> <a class="code" href="../../d7/d9c/class_dynamics_simulator.html">DynamicsSimulator&lt;double&gt;</a>(<a class="code" href="../../dd/d14/class_simulation.html#a0965cd3e2bce1b7ee1ce3f7f6d752444">_model</a>, (bool)<a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.use_spring_damper);</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#ad4e6dbc1efd77aff3fb32bad28df358e">_robotDataSimulator</a> = <span class="keyword">new</span> <a class="code" href="../../d7/d9c/class_dynamics_simulator.html">DynamicsSimulator&lt;double&gt;</a>(<a class="code" href="../../dd/d14/class_simulation.html#a33a669431e116d1e6c59af5a4a4ad9bf">_robotDataModel</a>, <span class="keyword">false</span>);</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#ae2e5a0a178a2c528d8aa939f85db7a3e">DVec&lt;double&gt;</a> zero12(12);</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  <span class="keywordflow">for</span> (<a class="code" href="../../d0/d99/c_types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> i = 0; i &lt; 12; i++) {</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    zero12[i] = 0.;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  }</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  <span class="comment">// set some sane defaults:</span></div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a4ca599c328bca7c738355b97ebf76337">_tau</a> = zero12;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#adf2d9c22a32a995bf2a8505947ca6871">_robotControllerState</a>.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a> = zero12;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#adf2d9c22a32a995bf2a8505947ca6871">_robotControllerState</a>.<a class="code" href="../../de/d75/struct_f_b_model_state.html#a97f42a6014fc5d9fd3dc22f7158099f4">qd</a> = zero12;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <a class="code" href="../../de/d75/struct_f_b_model_state.html">FBModelState&lt;double&gt;</a> x0;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae42e1f0d68b89af761bcaf273b97bca7">bodyOrientation</a> = <a class="code" href="../../da/d9b/namespaceori.html#a73c3872af6870d856cedd662856fcaea">rotationMatrixToQuaternion</a>(</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;      <a class="code" href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">ori::coordinateRotation</a>(CoordinateAxis::Z, 0.));</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <span class="comment">// Mini Cheetah</span></div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#abbf400085816b6baa4e4a0597ac5b118">bodyPosition</a>.setZero();</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#abf1fc0221d6b92d103193524a2046ffc">bodyVelocity</a>.setZero();</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a> = zero12;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#a97f42a6014fc5d9fd3dc22f7158099f4">qd</a> = zero12;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  <span class="comment">// Mini Cheetah Initial Posture</span></div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  <span class="comment">// x0.bodyPosition[2] = -0.49;</span></div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  <span class="comment">// Cheetah 3</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;  <span class="comment">// x0.bodyPosition[2] = -0.34;</span></div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  <span class="comment">// x0.q[0] = -0.807;</span></div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  <span class="comment">// x0.q[1] = -1.2;</span></div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  <span class="comment">// x0.q[2] = 2.4;</span></div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  <span class="comment">// x0.q[3] = 0.807;</span></div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  <span class="comment">// x0.q[4] = -1.2;</span></div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  <span class="comment">// x0.q[5] = 2.4;</span></div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;  <span class="comment">// x0.q[6] = -0.807;</span></div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  <span class="comment">// x0.q[7] = -1.2;</span></div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  <span class="comment">// x0.q[8] = 2.4;</span></div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  <span class="comment">// x0.q[9] = 0.807;</span></div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  <span class="comment">// x0.q[10] = -1.2;</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;  <span class="comment">// x0.q[11] = 2.4;</span></div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  <span class="comment">// Initial (Mini Cheetah stand)</span></div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  <span class="comment">// x0.bodyPosition[2] = -0.185;</span></div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  <span class="comment">// Cheetah 3</span></div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  <span class="comment">// x0.bodyPosition[2] = -0.075;</span></div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;  <span class="comment">// x0.q[0] = -0.03;</span></div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  <span class="comment">// x0.q[1] = -0.79;</span></div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  <span class="comment">// x0.q[2] = 1.715;</span></div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;  <span class="comment">// x0.q[3] = 0.03;</span></div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;  <span class="comment">// x0.q[4] = -0.79;</span></div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  <span class="comment">// x0.q[5] = 1.715;</span></div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  <span class="comment">// x0.q[6] = -0.03;</span></div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  <span class="comment">// x0.q[7] = -0.72;</span></div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;  <span class="comment">// x0.q[8] = 1.715;</span></div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  <span class="comment">// x0.q[9] = 0.03;</span></div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  <span class="comment">// x0.q[10] = -0.72;</span></div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  <span class="comment">// x0.q[11] = 1.715;</span></div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  <span class="comment">// Cheetah lies on the ground</span></div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  <span class="comment">//x0.bodyPosition[2] = -0.45;</span></div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#abbf400085816b6baa4e4a0597ac5b118">bodyPosition</a>[2] = 0.05;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[0] = -0.7;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[1] = 1.;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[2] = 2.715;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[3] = 0.7;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[4] = 1.;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[5] = 2.715;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[6] = -0.7;</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[7] = -1.0;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[8] = -2.715;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[9] = 0.7;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[10] = -1.0;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;  x0.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[11] = -2.715;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a8a3a6fa9691b58d5dc614d98b8e4fefb">setRobotState</a>(x0);</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#ad4e6dbc1efd77aff3fb32bad28df358e">_robotDataSimulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a1b185d90d2b15840ca57f8e2adcf84fb">setState</a>(x0);</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;  printf(<span class="stringliteral">&quot;[Simulation] Setup low-level control...\n&quot;</span>);</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  <span class="comment">// init spine:</span></div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a>) {</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#abfe1f6283d725c294a80ec8cebaa854f">_spineBoards</a>[leg].<a class="code" href="../../d1/da3/class_spine_board.html#af87f98dae049bafb3f9629609fb611e5">init</a>(<a class="code" href="../../dc/d66/class_quadruped.html">Quadruped&lt;float&gt;::getSideSign</a>(leg), leg);</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#abfe1f6283d725c294a80ec8cebaa854f">_spineBoards</a>[leg].<a class="code" href="../../d1/da3/class_spine_board.html#ab9ad96d3ede3c640ca73af2d4c5208e7">data</a> = &amp;<a class="code" href="../../dd/d14/class_simulation.html#ad1fa8b0ac8786fd394a822547c507d48">_spiData</a>;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#abfe1f6283d725c294a80ec8cebaa854f">_spineBoards</a>[leg].<a class="code" href="../../d1/da3/class_spine_board.html#aa14a53c2ee68bf08c9a0e81071f88d0e">cmd</a> = &amp;<a class="code" href="../../dd/d14/class_simulation.html#a846c1153eb5f89deea68886b1faea5b9">_spiCommand</a>;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#abfe1f6283d725c294a80ec8cebaa854f">_spineBoards</a>[leg].<a class="code" href="../../d1/da3/class_spine_board.html#a99f95ce2c0ee9e9aef4c5f3343bc60d3">resetData</a>();</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#abfe1f6283d725c294a80ec8cebaa854f">_spineBoards</a>[leg].<a class="code" href="../../d1/da3/class_spine_board.html#a1bb279c9df7a772f4878fba9b508cfaa">resetCommand</a>();</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    }</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45">RobotType::CHEETAH_3</a>) {</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <span class="comment">// init ti board</span></div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#af206908794036d14ba5c4c1d19779588">_tiBoards</a>[leg].<a class="code" href="../../d4/d1a/class_t_i___board_control.html#a74d8da6940a7d241f14b14938fa896a1">init</a>(<a class="code" href="../../dc/d66/class_quadruped.html">Quadruped&lt;float&gt;::getSideSign</a>(leg));</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#af206908794036d14ba5c4c1d19779588">_tiBoards</a>[leg].<a class="code" href="../../d4/d1a/class_t_i___board_control.html#a71d83e45bced344c5c8dc8df039cfc50">set_link_lengths</a>(<a class="code" href="../../dd/d14/class_simulation.html#af713a3529e71a04c0b832dd2e10591fb">_quadruped</a>.<a class="code" href="../../dc/d66/class_quadruped.html#add43dcb4994e6e31375c4515e8de397d">_abadLinkLength</a>,</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;                                      <a class="code" href="../../dd/d14/class_simulation.html#af713a3529e71a04c0b832dd2e10591fb">_quadruped</a>.<a class="code" href="../../dc/d66/class_quadruped.html#a2b1208249b4fa5e9dc3b08916fae04c7">_hipLinkLength</a>,</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;                                      <a class="code" href="../../dd/d14/class_simulation.html#af713a3529e71a04c0b832dd2e10591fb">_quadruped</a>.<a class="code" href="../../dc/d66/class_quadruped.html#ae752ca0d75b7e1ae759c1285be62d068">_kneeLinkLength</a>);</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#af206908794036d14ba5c4c1d19779588">_tiBoards</a>[leg].<a class="code" href="../../d4/d1a/class_t_i___board_control.html#a9c8430956bc19a3fa44d433c85d7ef09">reset_ti_board_command</a>();</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#af206908794036d14ba5c4c1d19779588">_tiBoards</a>[leg].<a class="code" href="../../d4/d1a/class_t_i___board_control.html#a3e42e3be8465ec6bd30fae50975a41f6">reset_ti_board_data</a>();</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#af206908794036d14ba5c4c1d19779588">_tiBoards</a>[leg].<a class="code" href="../../d4/d1a/class_t_i___board_control.html#af9bf713f3d84030ef027664c9dbad07b">run_ti_board_iteration</a>();</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    }</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    assert(<span class="keyword">false</span>);</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;  }</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;  <span class="comment">// init shared memory</span></div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;  printf(<span class="stringliteral">&quot;[Simulation] Setup shared memory...\n&quot;</span>);</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>.<a class="code" href="../../d1/d8d/class_shared_memory_object.html#a6b21aa9ce01bcd55504953446dc2ab2b">createNew</a>(<a class="code" href="../../d2/dac/_shared_memory_8h.html#a81248e6de8785a7320f0ae3d455c0298">DEVELOPMENT_SIMULATOR_SHARED_MEMORY_NAME</a>, <span class="keyword">true</span>);</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().init();</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;  <span class="comment">// shared memory fields:</span></div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simToRobot.robotType = <a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a>;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#abd0bda993bf3d65a019abe27efbad85e">_visualizationData</a> =</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;      &amp;<a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().robotToSim.visualizationData;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;  <span class="comment">// load robot control parameters</span></div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;  printf(<span class="stringliteral">&quot;[Simulation] Load control parameters...\n&quot;</span>);</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a>) {</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#abb7498934699436a95c29b400df699e9">_robotParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#a18eb23794d712e6c56120e644883e4e0">initializeFromYamlFile</a>(<a class="code" href="../../de/df0/utilities_8h.html#afe1bbec53e0ac370224c4aa5c3433b0e">getConfigDirectoryPath</a>() +</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;                                        <a class="code" href="../../d2/dc1/_simulator_parameters_8h.html#a7e57f99279ad4c4bef21220b9f09e768">MINI_CHEETAH_DEFAULT_PARAMETERS</a>);</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45">RobotType::CHEETAH_3</a>) {</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#abb7498934699436a95c29b400df699e9">_robotParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#a18eb23794d712e6c56120e644883e4e0">initializeFromYamlFile</a>(<a class="code" href="../../de/df0/utilities_8h.html#afe1bbec53e0ac370224c4aa5c3433b0e">getConfigDirectoryPath</a>() +</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;                                        <a class="code" href="../../d2/dc1/_simulator_parameters_8h.html#a5eaf6a55cc62b298e00b5dd5f02a1203">CHEETAH_3_DEFAULT_PARAMETERS</a>);</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    assert(<span class="keyword">false</span>);</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;  }</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;  <span class="keywordflow">if</span> (!<a class="code" href="../../dd/d14/class_simulation.html#abb7498934699436a95c29b400df699e9">_robotParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#a12b144b3d659080b6e0bfd93569b566e">isFullyInitialized</a>()) {</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    printf(<span class="stringliteral">&quot;Not all robot control parameters were initialized. Missing:\n%s\n&quot;</span>,</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;           <a class="code" href="../../dd/d14/class_simulation.html#abb7498934699436a95c29b400df699e9">_robotParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#a6fc860c65c6484562dfc922cb5806410">generateUnitializedList</a>().c_str());</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;not all parameters initialized from ini file&quot;</span>);</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;  }</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;  <span class="comment">// init IMU simulator</span></div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;  printf(<span class="stringliteral">&quot;[Simulation] Setup IMU simulator...\n&quot;</span>);</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a08195e8efa3d8d3c655bfb859b8bcdda">_imuSimulator</a> = <span class="keyword">new</span> <a class="code" href="../../d8/da4/class_imu_simulator.html">ImuSimulator&lt;double&gt;</a>(<a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>);</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#af025ae2e93e63f23e77802189bfbc0af">unlockMutex</a>();</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;  printf(<span class="stringliteral">&quot;[Simulation] Ready!\n&quot;</span>);</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;}</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="../../dd/d14/class_simulation.html#a31364f2daa9daedef347aaff4001796c">  216</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d14/class_simulation.html#a31364f2daa9daedef347aaff4001796c">Simulation::sendControlParameter</a>(<span class="keyword">const</span> std::string&amp; name,</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;                                      <a class="code" href="../../df/df2/union_control_parameter_value.html">ControlParameterValue</a> value,</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;                                      <a class="code" href="../../d2/d01/_control_parameters_8h.html#a09b572cf97f12b378290dee549d8ecc3">ControlParameterValueKind</a> kind, <span class="keywordtype">bool</span> isUser) {</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;  <a class="code" href="../../d6/d6d/struct_control_parameter_request.html">ControlParameterRequest</a>&amp; request =</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simToRobot.controlParameterRequest;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;  <a class="code" href="../../d4/d34/struct_control_parameter_response.html">ControlParameterResponse</a>&amp; response =</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().robotToSim.controlParameterResponse;</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;  <span class="comment">// first check no pending message</span></div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;  assert(request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#a7499c6aedd179056b9615b8c00fffb9f">requestNumber</a> == response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#ac73006eb720e25486d3937bdf2657c2c">requestNumber</a>);</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;  <span class="comment">// new message</span></div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;  request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#a7499c6aedd179056b9615b8c00fffb9f">requestNumber</a>++;</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;  <span class="comment">// message data</span></div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;  request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ad991ed9045c129311774dc9ac4c97de7">requestKind</a> = isUser ? <a class="code" href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508a7cd01036768fe3a9f7f5cccc148f833e">ControlParameterRequestKind::SET_USER_PARAM_BY_NAME</a> : <a class="code" href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508a592d3b9333f88bfabfaa2b00fb225ebb">ControlParameterRequestKind::SET_ROBOT_PARAM_BY_NAME</a>;</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;  strcpy(request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ad03bd9ffd8b4ed1dbcdd72a07fabc2d3">name</a>, name.c_str());</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;  request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#afcc0b006e83760030cde3ab151aca929">value</a> = value;</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;  request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a> = kind;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;  printf(<span class="stringliteral">&quot;%s\n&quot;</span>, request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#a8652e8975cfc2b0ea04e573ea7eb15e4">toString</a>().c_str());</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;  <span class="comment">// run robot:</span></div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a1a4397660fa821c19c2bcc75662106ae">_robotMutex</a>.lock();</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simToRobot.mode = <a class="code" href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4fa586d6fd9d775c897fdf1d14fbc9b0616">SimulatorMode::RUN_CONTROL_PARAMETERS</a>;</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simulatorIsDone();</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;  <span class="comment">// wait for robot code to finish</span></div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().waitForRobotWithTimeout()) {</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#ae8523a0daf2a3f08822688ee40e63fa9">_wantStop</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#aba2b5400e0985d7d0db4d47baeb14787">_running</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#abb36e526299957c7f879d350e0a0c75a">_connected</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;    printf(</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        <span class="stringliteral">&quot;[ERROR] Timed out waiting for message from robot!  Did it crash?\n&quot;</span>);</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#a7499c6aedd179056b9615b8c00fffb9f">requestNumber</a> = response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#ac73006eb720e25486d3937bdf2657c2c">requestNumber</a>;</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a1a4397660fa821c19c2bcc75662106ae">_robotMutex</a>.unlock();</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    <span class="keywordflow">return</span>;</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;  }</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;  <span class="comment">//_sharedMemory().waitForRobot();</span></div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a1a4397660fa821c19c2bcc75662106ae">_robotMutex</a>.unlock();</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;  <span class="comment">// verify response is good</span></div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;  assert(response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#ac73006eb720e25486d3937bdf2657c2c">requestNumber</a> == request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#a7499c6aedd179056b9615b8c00fffb9f">requestNumber</a>);</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;  assert(response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#a92b038f05343b0724848ed37b70c59cc">parameterKind</a> == request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a>);</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;  assert(std::string(response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#ade6ee0a7cb7f80ca17ced8276ed3dac6">name</a>) == request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ad03bd9ffd8b4ed1dbcdd72a07fabc2d3">name</a>);</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;}</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;</div><div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="../../dd/d14/class_simulation.html#ab264f11e0f5fc0e601644f1c9e8ced64">  268</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d14/class_simulation.html#ab264f11e0f5fc0e601644f1c9e8ced64">Simulation::firstRun</a>() {</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;  <span class="comment">// connect to robot</span></div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a1a4397660fa821c19c2bcc75662106ae">_robotMutex</a>.lock();</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simToRobot.mode = <a class="code" href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4facd6102c4e0e339658526415ee06ad67d">SimulatorMode::DO_NOTHING</a>;</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simulatorIsDone();</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;  printf(<span class="stringliteral">&quot;[Simulation] Waiting for robot...\n&quot;</span>);</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;  <span class="comment">// this loop will check to see if the robot is connected at 10 Hz</span></div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;  <span class="comment">// doing this in a loop allows us to click the &quot;stop&quot; button in the GUI</span></div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;  <span class="comment">// and escape from here before the robot code connects, if needed</span></div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;  <span class="keywordflow">while</span> (!<a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().tryWaitForRobot()) {</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#ae8523a0daf2a3f08822688ee40e63fa9">_wantStop</a>) {</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;      <span class="keywordflow">return</span>;</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    }</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    usleep(100000);</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;  }</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  printf(<span class="stringliteral">&quot;Success! the robot is alive\n&quot;</span>);</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#abb36e526299957c7f879d350e0a0c75a">_connected</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a1a4397660fa821c19c2bcc75662106ae">_robotMutex</a>.unlock();</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;  <span class="comment">// send all control parameters</span></div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;  printf(<span class="stringliteral">&quot;[Simulation] Send robot control parameters to robot...\n&quot;</span>);</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; kv : <a class="code" href="../../dd/d14/class_simulation.html#abb7498934699436a95c29b400df699e9">_robotParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#ab42dff0f07e88bf44c831238dd4ce96f">collection</a>.<a class="code" href="../../dd/da1/class_control_parameter_collection.html#a10baad903728358f310f523c45e0326c">_map</a>) {</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a31364f2daa9daedef347aaff4001796c">sendControlParameter</a>(kv.first, kv.second-&gt;get(kv.second-&gt;_kind),</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;                         kv.second-&gt;_kind, <span class="keyword">false</span>);</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;  }</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; kv : <a class="code" href="../../dd/d14/class_simulation.html#af97dee243877316b7e78ba6d56a3cd2f">_userParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#ab42dff0f07e88bf44c831238dd4ce96f">collection</a>.<a class="code" href="../../dd/da1/class_control_parameter_collection.html#a10baad903728358f310f523c45e0326c">_map</a>) {</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a31364f2daa9daedef347aaff4001796c">sendControlParameter</a>(kv.first, kv.second-&gt;get(kv.second-&gt;_kind),</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;                         kv.second-&gt;_kind, <span class="keyword">true</span>);</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;  }</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;}</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;</div><div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="../../dd/d14/class_simulation.html#a5474b99a1471e382b2e6a87adff814dc">  305</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d14/class_simulation.html#a5474b99a1471e382b2e6a87adff814dc">Simulation::step</a>(<span class="keywordtype">double</span> dt, <span class="keywordtype">double</span> dtLowLevelControl,</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;                      <span class="keywordtype">double</span> dtHighLevelControl) {</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;  <span class="comment">// Low level control (if needed)</span></div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a44340d99dee87ef14aaf02faa94ea3d4">_currentSimTime</a> &gt;= <a class="code" href="../../dd/d14/class_simulation.html#afef7938d79bfa913a86ff4b4448d9ae7">_timeOfNextLowLevelControl</a>) {</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#acfb66e9a45bf3c99747d271418f34bfe">lowLevelControl</a>();</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#afef7938d79bfa913a86ff4b4448d9ae7">_timeOfNextLowLevelControl</a> = <a class="code" href="../../dd/d14/class_simulation.html#afef7938d79bfa913a86ff4b4448d9ae7">_timeOfNextLowLevelControl</a> + dtLowLevelControl;</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;  }</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;  <span class="comment">// High level control</span></div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a44340d99dee87ef14aaf02faa94ea3d4">_currentSimTime</a> &gt;= <a class="code" href="../../dd/d14/class_simulation.html#adee3976d5353a82874f9e793269044b7">_timeOfNextHighLevelControl</a>) {</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;<span class="preprocessor">#ifndef DISABLE_HIGH_LEVEL_CONTROL</span></div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a04559087d745de92a850e2c490d4981d">highLevelControl</a>();</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#adee3976d5353a82874f9e793269044b7">_timeOfNextHighLevelControl</a> =</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;        <a class="code" href="../../dd/d14/class_simulation.html#adee3976d5353a82874f9e793269044b7">_timeOfNextHighLevelControl</a> + dtHighLevelControl;</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;  }</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;  <span class="comment">// actuator model:</span></div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a>) {</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> joint = 0; joint &lt; 3; joint++) {</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;        <a class="code" href="../../dd/d14/class_simulation.html#a4ca599c328bca7c738355b97ebf76337">_tau</a>[leg * 3 + joint] = <a class="code" href="../../dd/d14/class_simulation.html#af1e50315d809d3306564abf7225f6864">_actuatorModels</a>[joint].getTorque(</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;            <a class="code" href="../../dd/d14/class_simulation.html#abfe1f6283d725c294a80ec8cebaa854f">_spineBoards</a>[leg].torque_out[joint],</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;            <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">getState</a>().<a class="code" href="../../de/d75/struct_f_b_model_state.html#a97f42a6014fc5d9fd3dc22f7158099f4">qd</a>[leg * 3 + joint]);</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;      }</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;    }</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45">RobotType::CHEETAH_3</a>) {</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> joint = 0; joint &lt; 3; joint++) {</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;        <a class="code" href="../../dd/d14/class_simulation.html#a4ca599c328bca7c738355b97ebf76337">_tau</a>[leg * 3 + joint] = <a class="code" href="../../dd/d14/class_simulation.html#af1e50315d809d3306564abf7225f6864">_actuatorModels</a>[joint].getTorque(</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;            <a class="code" href="../../dd/d14/class_simulation.html#af206908794036d14ba5c4c1d19779588">_tiBoards</a>[leg].data-&gt;tau_des[joint],</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;            <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">getState</a>().<a class="code" href="../../de/d75/struct_f_b_model_state.html#a97f42a6014fc5d9fd3dc22f7158099f4">qd</a>[leg * 3 + joint]);</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;      }</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    }</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    assert(<span class="keyword">false</span>);</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;  }</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;  <span class="comment">// dynamics</span></div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a44340d99dee87ef14aaf02faa94ea3d4">_currentSimTime</a> += dt;</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;  <span class="comment">// Set Homing Information</span></div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;  <a class="code" href="../../dc/d77/struct_robot_homing_info.html">RobotHomingInfo&lt;double&gt;</a> homing;</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;  homing.<a class="code" href="../../dc/d77/struct_robot_homing_info.html#a608c91ebe844df5996d009ea349339e9">active_flag</a> = <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.go_home;</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;  homing.<a class="code" href="../../dc/d77/struct_robot_homing_info.html#a1703b27800fa38b4638bff2189bbe4cc">position</a> = <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.home_pos;</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;  homing.<a class="code" href="../../dc/d77/struct_robot_homing_info.html#abf4040ec16284bcb4188fe19fcdbff04">rpy</a> = <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.home_rpy;</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;  homing.<a class="code" href="../../dc/d77/struct_robot_homing_info.html#aa1edeee5c09e12e166c04c1d0b1e3fb8">kp_lin</a> = <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.home_kp_lin;</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;  homing.<a class="code" href="../../dc/d77/struct_robot_homing_info.html#af43f44aa70884117358c840424a12ca7">kd_lin</a> = <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.home_kd_lin;</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;  homing.<a class="code" href="../../dc/d77/struct_robot_homing_info.html#a3ef8244250bfc8fadc3c1b608207b190">kp_ang</a> = <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.home_kp_ang;</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;  homing.<a class="code" href="../../dc/d77/struct_robot_homing_info.html#a2e3ebe7ba69ff8774f21e81b925f4c2c">kd_ang</a> = <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.home_kd_ang;</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a339504f4bd9866588fd73b2fc0fbab0d">setHoming</a>(homing);</div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a84b25acaf7edf23f4f437a96a0d8ba05">step</a>(dt, <a class="code" href="../../dd/d14/class_simulation.html#a4ca599c328bca7c738355b97ebf76337">_tau</a>, <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.floor_kp, <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.floor_kd);</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;}</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;</div><div class="line"><a name="l00360"></a><span class="lineno"><a class="line" href="../../dd/d14/class_simulation.html#acfb66e9a45bf3c99747d271418f34bfe">  360</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d14/class_simulation.html#acfb66e9a45bf3c99747d271418f34bfe">Simulation::lowLevelControl</a>() {</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a>) {</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    <span class="comment">// update spine board data:</span></div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#ad1fa8b0ac8786fd394a822547c507d48">_spiData</a>.<a class="code" href="../../d5/d09/struct_spi_data.html#afc88f10c94dc79b05e984aa7ed927d8b">q_abad</a>[leg] = <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">getState</a>().<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[leg * 3 + 0];</div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#ad1fa8b0ac8786fd394a822547c507d48">_spiData</a>.<a class="code" href="../../d5/d09/struct_spi_data.html#a55471fdb44f070c4e9c6ef4b128d0f9c">q_hip</a>[leg] = <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">getState</a>().<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[leg * 3 + 1];</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#ad1fa8b0ac8786fd394a822547c507d48">_spiData</a>.<a class="code" href="../../d5/d09/struct_spi_data.html#a61b173572d313d693cb37aa346cbd4b2">q_knee</a>[leg] = <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">getState</a>().<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[leg * 3 + 2];</div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#ad1fa8b0ac8786fd394a822547c507d48">_spiData</a>.<a class="code" href="../../d5/d09/struct_spi_data.html#acabffbc789cc4b3dbe876dadde510498">qd_abad</a>[leg] = <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">getState</a>().<a class="code" href="../../de/d75/struct_f_b_model_state.html#a97f42a6014fc5d9fd3dc22f7158099f4">qd</a>[leg * 3 + 0];</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#ad1fa8b0ac8786fd394a822547c507d48">_spiData</a>.<a class="code" href="../../d5/d09/struct_spi_data.html#af6aa9e4ce4989d485f2170af59bf84cf">qd_hip</a>[leg] = <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">getState</a>().<a class="code" href="../../de/d75/struct_f_b_model_state.html#a97f42a6014fc5d9fd3dc22f7158099f4">qd</a>[leg * 3 + 1];</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#ad1fa8b0ac8786fd394a822547c507d48">_spiData</a>.<a class="code" href="../../d5/d09/struct_spi_data.html#a97d6ab668da0a2f52b11468508b715ef">qd_knee</a>[leg] = <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">getState</a>().<a class="code" href="../../de/d75/struct_f_b_model_state.html#a97f42a6014fc5d9fd3dc22f7158099f4">qd</a>[leg * 3 + 2];</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    }</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    <span class="comment">// run spine board control:</span></div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;    <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; spineBoard : <a class="code" href="../../dd/d14/class_simulation.html#abfe1f6283d725c294a80ec8cebaa854f">_spineBoards</a>) {</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;      spineBoard.run();</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;    }</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45">RobotType::CHEETAH_3</a>) {</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    <span class="comment">// update data</span></div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> joint = 0; joint &lt; 3; joint++) {</div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;        <a class="code" href="../../dd/d14/class_simulation.html#af206908794036d14ba5c4c1d19779588">_tiBoards</a>[leg].<a class="code" href="../../d4/d1a/class_t_i___board_control.html#a9365069ffa74df468313b55d24d4fcce">data</a>-&gt;<a class="code" href="../../de/de1/struct_ti_board_data.html#abbd604ce0592a16aeff781483306034f">q</a>[joint] =</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;            <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">getState</a>().<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[leg * 3 + joint];</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;        <a class="code" href="../../dd/d14/class_simulation.html#af206908794036d14ba5c4c1d19779588">_tiBoards</a>[leg].<a class="code" href="../../d4/d1a/class_t_i___board_control.html#a9365069ffa74df468313b55d24d4fcce">data</a>-&gt;<a class="code" href="../../de/de1/struct_ti_board_data.html#a59bdb52d482a8cf13b0eefe34760b530">dq</a>[joint] =</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;            <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">getState</a>().<a class="code" href="../../de/d75/struct_f_b_model_state.html#a97f42a6014fc5d9fd3dc22f7158099f4">qd</a>[leg * 3 + joint];</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;      }</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    }</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    <span class="comment">// run control</span></div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;    <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; tiBoard : <a class="code" href="../../dd/d14/class_simulation.html#af206908794036d14ba5c4c1d19779588">_tiBoards</a>) {</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;      tiBoard.run_ti_board_iteration();</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;    }</div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;    assert(<span class="keyword">false</span>);</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;  }</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;}</div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;</div><div class="line"><a name="l00398"></a><span class="lineno"><a class="line" href="../../dd/d14/class_simulation.html#a04559087d745de92a850e2c490d4981d">  398</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d14/class_simulation.html#a04559087d745de92a850e2c490d4981d">Simulation::highLevelControl</a>() {</div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;  <span class="comment">// send joystick data to robot:</span></div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simToRobot.gamepadCommand = <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ac7b1785526bd53f8ff17592fc838a630">getDriverCommand</a>();</div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simToRobot.gamepadCommand.applyDeadband(</div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.game_controller_deadband);</div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;</div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;  <span class="comment">// send IMU data to robot:</span></div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a08195e8efa3d8d3c655bfb859b8bcdda">_imuSimulator</a>-&gt;<a class="code" href="../../d8/da4/class_imu_simulator.html#aadd00de99602f7c66cba555527bf3294">updateCheaterState</a>(<a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">getState</a>(),</div><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;                                    <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a1dc9f92d57994e053f91b9cb619adde4">getDState</a>(),</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;                                    <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simToRobot.cheaterState);</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;</div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a08195e8efa3d8d3c655bfb859b8bcdda">_imuSimulator</a>-&gt;<a class="code" href="../../d8/da4/class_imu_simulator.html#a1c6eaa5dfe26a97bdfeec6b58cad0ad4">updateVectornav</a>(<a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">getState</a>(),</div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;                                   <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a1dc9f92d57994e053f91b9cb619adde4">getDState</a>(),</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;                                   &amp;<a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simToRobot.vectorNav);</div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;</div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;</div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;  <span class="comment">// send leg data to robot</span></div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a>) {</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simToRobot.spiData = <a class="code" href="../../dd/d14/class_simulation.html#ad1fa8b0ac8786fd394a822547c507d48">_spiData</a>;</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45">RobotType::CHEETAH_3</a>) {</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 4; i++) {</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simToRobot.tiBoardData[i] = *<a class="code" href="../../dd/d14/class_simulation.html#af206908794036d14ba5c4c1d19779588">_tiBoards</a>[i].<a class="code" href="../../d4/d1a/class_t_i___board_control.html#a9365069ffa74df468313b55d24d4fcce">data</a>;</div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;    }</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;    assert(<span class="keyword">false</span>);</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;  }</div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;</div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;  <span class="comment">// signal to the robot that it can start running</span></div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;  <span class="comment">// the _robotMutex is used to prevent qt (which runs in its own thread) from</span></div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;  <span class="comment">// sending a control parameter while the robot code is already running.</span></div><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a1a4397660fa821c19c2bcc75662106ae">_robotMutex</a>.lock();</div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simToRobot.mode = <a class="code" href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4faa438191831f2e6bd093884da88dd374f">SimulatorMode::RUN_CONTROLLER</a>;</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().simulatorIsDone();</div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;  <span class="comment">// wait for robot code to finish (and send LCM while waiting)</span></div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a631f7ffcbbba9b636bf851093c825739">_lcm</a>) {</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#ad20996d43bb2265500b4edb5fcb00dc6">buildLcmMessage</a>();</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a631f7ffcbbba9b636bf851093c825739">_lcm</a>-&gt;publish(<a class="code" href="../../d2/ded/_simulation_8h.html#a4dc49651cc087f6a9b07bf5f500da7bb">SIM_LCM_NAME</a>, &amp;<a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>);</div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;  }</div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;  <span class="comment">// first make sure we haven&#39;t killed the robot code</span></div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#ae8523a0daf2a3f08822688ee40e63fa9">_wantStop</a>) <span class="keywordflow">return</span>;</div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;</div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;  <span class="comment">// next try waiting at most 1 second:</span></div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().waitForRobotWithTimeout()) {</div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#ae8523a0daf2a3f08822688ee40e63fa9">_wantStop</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#aba2b5400e0985d7d0db4d47baeb14787">_running</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#abb36e526299957c7f879d350e0a0c75a">_connected</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;    printf(</div><div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;        <span class="stringliteral">&quot;[ERROR] Timed out waiting for message from robot!  Did it crash?\n&quot;</span>);</div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a1a4397660fa821c19c2bcc75662106ae">_robotMutex</a>.unlock();</div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;    <span class="keywordflow">return</span>;</div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;  }</div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a1a4397660fa821c19c2bcc75662106ae">_robotMutex</a>.unlock();</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;</div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;  <span class="comment">// update</span></div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a>) {</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a846c1153eb5f89deea68886b1faea5b9">_spiCommand</a> = <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().robotToSim.spiCommand;</div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;</div><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;    <span class="comment">// pretty_print(_spiCommand.q_des_abad, &quot;q des abad&quot;, 4);</span></div><div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;    <span class="comment">// pretty_print(_spiCommand.q_des_hip, &quot;q des hip&quot;, 4);</span></div><div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;    <span class="comment">// pretty_print(_spiCommand.q_des_knee, &quot;q des knee&quot;, 4);</span></div><div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">_robot</a> == <a class="code" href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45">RobotType::CHEETAH_3</a>) {</div><div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 4; i++) {</div><div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#af206908794036d14ba5c4c1d19779588">_tiBoards</a>[i].<a class="code" href="../../d4/d1a/class_t_i___board_control.html#a34adea65f3e6967356c8da43562bb3a9">command</a> = <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().robotToSim.tiBoardCommand[i];</div><div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;    }</div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;    assert(<span class="keyword">false</span>);</div><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;  }</div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;</div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#ae1f3a65499126d5d527500dd221300a4">_highLevelIterations</a>++;</div><div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;}</div><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;</div><div class="line"><a name="l00472"></a><span class="lineno"><a class="line" href="../../dd/d14/class_simulation.html#ad20996d43bb2265500b4edb5fcb00dc6">  472</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d14/class_simulation.html#ad20996d43bb2265500b4edb5fcb00dc6">Simulation::buildLcmMessage</a>() {</div><div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.time = <a class="code" href="../../dd/d14/class_simulation.html#a44340d99dee87ef14aaf02faa94ea3d4">_currentSimTime</a>;</div><div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.timesteps = <a class="code" href="../../dd/d14/class_simulation.html#ae1f3a65499126d5d527500dd221300a4">_highLevelIterations</a>;</div><div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;  <span class="keyword">auto</span>&amp; state = <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">getState</a>();</div><div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;  <span class="keyword">auto</span>&amp; dstate = <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a1dc9f92d57994e053f91b9cb619adde4">getDState</a>();</div><div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;</div><div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> rpy = <a class="code" href="../../da/d9b/namespaceori.html#add76bed815809cbebd38a8596b0f6224">ori::quatToRPY</a>(state.bodyOrientation);</div><div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a0b83d93a3c74d282558436e26c056896">RotMat&lt;double&gt;</a> Rbody = <a class="code" href="../../da/d9b/namespaceori.html#af88fa91d686c646d41f9b747a6bc90f0">ori::quaternionToRotationMatrix</a>(state.bodyOrientation);</div><div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> omega = Rbody.transpose() * state.bodyVelocity.head&lt;3&gt;();</div><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;  <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> v = Rbody.transpose() * state.bodyVelocity.tail&lt;3&gt;();</div><div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;</div><div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 4; i++) {</div><div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.quat[i] = state.bodyOrientation[i];</div><div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;  }</div><div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;</div><div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; 3; i++) {</div><div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.vb[i] = state.bodyVelocity[i + 3];  <span class="comment">// linear velocity in body frame</span></div><div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.rpy[i] = rpy[i];</div><div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; 3; j++) {</div><div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.R[i][j] = Rbody(i, j);</div><div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;    }</div><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.omegab[i] = state.bodyVelocity[i];</div><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.omega[i] = omega[i];</div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.p[i] = state.bodyPosition[i];</div><div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.v[i] = v[i];</div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.vbd[i] = dstate.dBodyVelocity[i + 3];</div><div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;  }</div><div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;</div><div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> leg = 0; leg &lt; 4; leg++) {</div><div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> joint = 0; joint &lt; 3; joint++) {</div><div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.q[leg][joint] = state.q[leg * 3 + joint];</div><div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.qd[leg][joint] = state.qd[leg * 3 + joint];</div><div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.qdd[leg][joint] = dstate.qdd[leg * 3 + joint];</div><div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.tau[leg][joint] = <a class="code" href="../../dd/d14/class_simulation.html#a4ca599c328bca7c738355b97ebf76337">_tau</a>[leg * 3 + joint];</div><div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;      <span class="keywordtype">size_t</span> gcID = <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a560cb59e43a731fd2a8bb4f54b4086bd">getModel</a>().<a class="code" href="../../d6/db1/class_floating_base_model.html#abb9ab3c0c626c9f25ab122e9ffcd25d4">_footIndicesGC</a>.at(leg);</div><div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.p_foot[leg][joint] = <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a560cb59e43a731fd2a8bb4f54b4086bd">getModel</a>().<a class="code" href="../../d6/db1/class_floating_base_model.html#a5566ab4692461d4240cec1fdbc2ab948">_pGC</a>.at(gcID)[joint];</div><div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">_simLCM</a>.f_foot[leg][joint] = <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a9afb9649511f0eb19f953bf470d80252">getContactForce</a>(gcID)[joint];</div><div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;    }</div><div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;  }</div><div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;}</div><div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;</div><div class="line"><a name="l00520"></a><span class="lineno"><a class="line" href="../../dd/d14/class_simulation.html#a20c4e8286bb7880f186e0aa3fe5f103e">  520</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d14/class_simulation.html#a20c4e8286bb7880f186e0aa3fe5f103e">Simulation::addCollisionPlane</a>(<span class="keywordtype">double</span> mu, <span class="keywordtype">double</span> resti, <span class="keywordtype">double</span> height,</div><div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;                                   <span class="keywordtype">double</span> sizeX, <span class="keywordtype">double</span> sizeY, <span class="keywordtype">double</span> checkerX,</div><div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;                                   <span class="keywordtype">double</span> checkerY, <span class="keywordtype">bool</span> addToWindow) {</div><div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#ac35ba5a30a31d439be9933947e6c806a">addCollisionPlane</a>(mu, resti, height);</div><div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;  <span class="keywordflow">if</span> (addToWindow &amp;&amp; <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>) {</div><div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ac763bf007eb93804b0350340cc6adb80">lockGfxMutex</a>();</div><div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;    <a class="code" href="../../df/d89/class_checkerboard.html">Checkerboard</a> checker(sizeX, sizeY, checkerX, checkerY);</div><div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;</div><div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;    <span class="keywordtype">size_t</span> graphicsID = <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#a1df4a5846120d050f009a8736424f221">addCheckerboard</a>(checker);</div><div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#a792c90bc3c128f684bd62928b24d2d38">buildDrawList</a>();</div><div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#ae3f55365bc72bedb51b835533c515861">updateCheckerboard</a>(height, graphicsID);</div><div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#a4c7364a808d197a1632386204c6eb20c">unlockGfxMutex</a>();</div><div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;  }</div><div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;}</div><div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;</div><div class="line"><a name="l00546"></a><span class="lineno"><a class="line" href="../../dd/d14/class_simulation.html#a33e67c5154f5fdbab0d49f23777f4313">  546</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d14/class_simulation.html#a33e67c5154f5fdbab0d49f23777f4313">Simulation::addCollisionBox</a>(<span class="keywordtype">double</span> mu, <span class="keywordtype">double</span> resti, <span class="keywordtype">double</span> depth,</div><div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;                                 <span class="keywordtype">double</span> width, <span class="keywordtype">double</span> height,</div><div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;                                 <span class="keyword">const</span> <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a>&amp; pos,</div><div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;                                 <span class="keyword">const</span> <a class="code" href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3&lt;double&gt;</a>&amp; <a class="code" href="../../da/d9b/namespaceori.html">ori</a>, <span class="keywordtype">bool</span> addToWindow,</div><div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;                                 <span class="keywordtype">bool</span> transparent) {</div><div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#aa3c1c830bfa1dc1ceed7ff95f2f437c1">addCollisionBox</a>(mu, resti, depth, width, height, pos, ori);</div><div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;  <span class="keywordflow">if</span> (addToWindow &amp;&amp; <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>) {</div><div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ac763bf007eb93804b0350340cc6adb80">lockGfxMutex</a>();</div><div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#a9c2c9531b2de18e928fc8d0d20cfb4c7">addBox</a>(depth, width, height, pos, ori, transparent);</div><div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#a4c7364a808d197a1632386204c6eb20c">unlockGfxMutex</a>();</div><div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;  }</div><div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;}</div><div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;</div><div class="line"><a name="l00559"></a><span class="lineno"><a class="line" href="../../dd/d14/class_simulation.html#afae53444e828ca1ce1a8b20d2f9fecc6">  559</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d14/class_simulation.html#afae53444e828ca1ce1a8b20d2f9fecc6">Simulation::addCollisionMesh</a>(<span class="keywordtype">double</span> mu, <span class="keywordtype">double</span> resti, <span class="keywordtype">double</span> grid_size,</div><div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;                                  <span class="keyword">const</span> <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a>&amp; left_corner_loc,</div><div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;                                  <span class="keyword">const</span> <a class="code" href="../../d9/d8e/cpp_types_8h.html#a807200f3771dbd2cb2e4be52c5f2518c">DMat&lt;double&gt;</a>&amp; height_map,</div><div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;                                  <span class="keywordtype">bool</span> addToWindow, <span class="keywordtype">bool</span> transparent) {</div><div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a3ae2854bcabc457357f541359a1c2075">addCollisionMesh</a>(mu, resti, grid_size, left_corner_loc,</div><div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;                               height_map);</div><div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;  <span class="keywordflow">if</span> (addToWindow &amp;&amp; <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>) {</div><div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ac763bf007eb93804b0350340cc6adb80">lockGfxMutex</a>();</div><div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#a7e274d87788b859c9099a6b398116304">addMesh</a>(grid_size, left_corner_loc, height_map,</div><div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;                               transparent);</div><div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#a4c7364a808d197a1632386204c6eb20c">unlockGfxMutex</a>();</div><div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;  }</div><div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;}</div><div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;</div><div class="line"><a name="l00579"></a><span class="lineno"><a class="line" href="../../dd/d14/class_simulation.html#a34b590ee1fed73b2b6aaf3d2bcf3da0c">  579</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d14/class_simulation.html#a34b590ee1fed73b2b6aaf3d2bcf3da0c">Simulation::runAtSpeed</a>(<span class="keywordtype">bool</span> graphics) {</div><div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#ab264f11e0f5fc0e601644f1c9e8ced64">firstRun</a>();  <span class="comment">// load the control parameters</span></div><div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;</div><div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;  <span class="comment">// if we requested to stop, stop.</span></div><div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../dd/d14/class_simulation.html#ae8523a0daf2a3f08822688ee40e63fa9">_wantStop</a>) <span class="keywordflow">return</span>;</div><div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;  assert(!<a class="code" href="../../dd/d14/class_simulation.html#aba2b5400e0985d7d0db4d47baeb14787">_running</a>);</div><div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#aba2b5400e0985d7d0db4d47baeb14787">_running</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;  <a class="code" href="../../d8/d08/class_timer.html">Timer</a> frameTimer;</div><div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;  <a class="code" href="../../d8/d08/class_timer.html">Timer</a> freeRunTimer;</div><div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;  <a class="code" href="../../d0/d99/c_types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> desiredSteps = 0;</div><div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;  <a class="code" href="../../d0/d99/c_types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> steps = 0;</div><div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;</div><div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;  <span class="keywordtype">double</span> frameTime = 1. / 60.;</div><div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;  <span class="keywordtype">double</span> lastSimTime = 0;</div><div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;</div><div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;  printf(</div><div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;      <span class="stringliteral">&quot;[Simulator] Starting run loop (dt %f, dt-low-level %f, dt-high-level %f &quot;</span></div><div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;      <span class="stringliteral">&quot;speed %f graphics %d)...\n&quot;</span>,</div><div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.dynamics_dt, <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.low_level_dt, <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.high_level_dt,</div><div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.simulation_speed, graphics);</div><div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;</div><div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;  <span class="keywordflow">while</span> (<a class="code" href="../../dd/d14/class_simulation.html#aba2b5400e0985d7d0db4d47baeb14787">_running</a>) {</div><div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;    <span class="keywordtype">double</span> dt = <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.dynamics_dt;</div><div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;    <span class="keywordtype">double</span> dtLowLevelControl = <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.low_level_dt;</div><div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;    <span class="keywordtype">double</span> dtHighLevelControl = <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.high_level_dt;</div><div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#a496554e586e095dc468d56b61c5c6e16">_desiredSimSpeed</a> = (<a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a> &amp;&amp; <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#a04e989eeebcb1478ae61ba26206a8fae">wantTurbo</a>()) ? 100.<a class="code" href="../../dc/dd7/test__casadi_8cpp.html#ae20d7fba59865a21504b65cdb44cbfe5">f</a> : <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.simulation_speed;</div><div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;    <a class="code" href="../../d0/d99/c_types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> nStepsPerFrame = (<a class="code" href="../../d0/d99/c_types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a>)(((1. / 60.) / dt) * <a class="code" href="../../dd/d14/class_simulation.html#a496554e586e095dc468d56b61c5c6e16">_desiredSimSpeed</a>);</div><div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#a03c04c83e3710bf6812a4e7be4d359cf">IsPaused</a>() &amp;&amp; steps &lt; desiredSteps) {</div><div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#a8f614fa95d472922d65efe48238a7afc">lockMutex</a>();   </div><div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a5474b99a1471e382b2e6a87adff814dc">step</a>(dt, dtLowLevelControl, dtHighLevelControl);</div><div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">_simParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#af025ae2e93e63f23e77802189bfbc0af">unlockMutex</a>();</div><div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;      steps++;</div><div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;      <span class="keywordtype">double</span> timeRemaining = frameTime - frameTimer.<a class="code" href="../../d8/d08/class_timer.html#aa42cb0519d30540b49a8c73f8ea81470">getSeconds</a>();</div><div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;      <span class="keywordflow">if</span> (timeRemaining &gt; 0) {</div><div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;        usleep((<a class="code" href="../../d0/d99/c_types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>)(timeRemaining * 1e6));</div><div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;      }</div><div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;    }</div><div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;    <span class="keywordflow">if</span> (frameTimer.<a class="code" href="../../d8/d08/class_timer.html#aa42cb0519d30540b49a8c73f8ea81470">getSeconds</a>() &gt; frameTime) {</div><div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;      <span class="keywordtype">double</span> realElapsedTime = frameTimer.<a class="code" href="../../d8/d08/class_timer.html#aa42cb0519d30540b49a8c73f8ea81470">getSeconds</a>();</div><div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;      frameTimer.<a class="code" href="../../d8/d08/class_timer.html#a3a8b5272198d029779dc9302a54305a8">start</a>();</div><div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;      <span class="keywordflow">if</span> (graphics &amp;&amp; <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>) {</div><div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;        <span class="keywordtype">double</span> simRate = (<a class="code" href="../../dd/d14/class_simulation.html#a44340d99dee87ef14aaf02faa94ea3d4">_currentSimTime</a> - lastSimTime) / realElapsedTime;</div><div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;        lastSimTime = <a class="code" href="../../dd/d14/class_simulation.html#a44340d99dee87ef14aaf02faa94ea3d4">_currentSimTime</a>;</div><div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;        sprintf(<a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#a1113a4cce78fa8cf7919afc5dda360d5">infoString</a>,</div><div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;                <span class="stringliteral">&quot;[Simulation Run %5.2fx]\n&quot;</span></div><div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;                <span class="stringliteral">&quot;real-time:  %8.3f\n&quot;</span></div><div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;                <span class="stringliteral">&quot;sim-time:   %8.3f\n&quot;</span></div><div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;                <span class="stringliteral">&quot;rate:       %8.3f\n&quot;</span>,</div><div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;                _desiredSimSpeed, freeRunTimer.<a class="code" href="../../d8/d08/class_timer.html#aa42cb0519d30540b49a8c73f8ea81470">getSeconds</a>(), <a class="code" href="../../dd/d14/class_simulation.html#a44340d99dee87ef14aaf02faa94ea3d4">_currentSimTime</a>,</div><div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;                simRate);</div><div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;        <a class="code" href="../../dd/d14/class_simulation.html#a6186855f477a8b0add3cf41d5e5a6001">updateGraphics</a>();</div><div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;      }</div><div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;      <span class="keywordflow">if</span> (!<a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#a03c04c83e3710bf6812a4e7be4d359cf">IsPaused</a>() &amp;&amp; (desiredSteps - steps) &lt; nStepsPerFrame)</div><div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;        desiredSteps += nStepsPerFrame;</div><div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;    }</div><div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;  }</div><div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;}</div><div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;</div><div class="line"><a name="l00638"></a><span class="lineno"><a class="line" href="../../dd/d14/class_simulation.html#ad3b3a11e3a8d6e2119dbcf538802d5cf">  638</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d14/class_simulation.html#ad3b3a11e3a8d6e2119dbcf538802d5cf">Simulation::loadTerrainFile</a>(<span class="keyword">const</span> std::string&amp; terrainFileName,</div><div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160;                                 <span class="keywordtype">bool</span> addGraphics) {</div><div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;  printf(<span class="stringliteral">&quot;load terrain %s\n&quot;</span>, terrainFileName.c_str());</div><div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;  ParamHandler paramHandler(terrainFileName);</div><div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;</div><div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160;  <span class="keywordflow">if</span> (!paramHandler.fileOpenedSuccessfully()) {</div><div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;    printf(<span class="stringliteral">&quot;[ERROR] could not open yaml file for terrain\n&quot;</span>);</div><div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;    <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;yaml bad&quot;</span>);</div><div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;  }</div><div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;</div><div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;  std::vector&lt;std::string&gt; keys = paramHandler.getKeys();</div><div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;</div><div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; key : keys) {</div><div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;    <span class="keyword">auto</span> load = [&amp;](<span class="keywordtype">double</span>&amp; val, <span class="keyword">const</span> std::string&amp; name) {</div><div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;      <span class="keywordflow">if</span> (!paramHandler.getValue&lt;<span class="keywordtype">double</span>&gt;(key, name, val))</div><div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;        <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;terrain read bad: &quot;</span> + key + <span class="stringliteral">&quot; &quot;</span> + name);</div><div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160;    };</div><div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;</div><div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;    <span class="keyword">auto</span> loadVec = [&amp;](<span class="keywordtype">double</span>&amp; val, <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">size_t</span> idx) {</div><div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;      std::vector&lt;double&gt; v;</div><div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;      <span class="keywordflow">if</span> (!paramHandler.getVector&lt;<span class="keywordtype">double</span>&gt;(key, name, v))</div><div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;        <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;terrain read bad: &quot;</span> + key + <span class="stringliteral">&quot; &quot;</span> + name);</div><div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;      val = v.at(idx);</div><div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;    };</div><div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;</div><div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;    <span class="keyword">auto</span> loadArray = [&amp;](<span class="keywordtype">double</span>* val, <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">size_t</span> idx) {</div><div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;      std::vector&lt;double&gt; v;</div><div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;      <span class="keywordflow">if</span> (!paramHandler.getVector&lt;<span class="keywordtype">double</span>&gt;(key, name, v))</div><div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;        <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;terrain read bad: &quot;</span> + key + <span class="stringliteral">&quot; &quot;</span> + name);</div><div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;      assert(v.size() == idx);</div><div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; idx; i++) val[i] = v[i];</div><div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;    };</div><div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;</div><div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;    printf(<span class="stringliteral">&quot;terrain element %s\n&quot;</span>, key.c_str());</div><div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;    std::string typeName;</div><div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;    paramHandler.getString(key, <span class="stringliteral">&quot;type&quot;</span>, typeName);</div><div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;    <span class="keywordflow">if</span> (typeName == <span class="stringliteral">&quot;infinite-plane&quot;</span>) {</div><div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;      <span class="keywordtype">double</span> mu, resti, height, gfxX, gfxY, checkerX, checkerY;</div><div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;      load(mu, <span class="stringliteral">&quot;mu&quot;</span>);</div><div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;      load(resti, <span class="stringliteral">&quot;restitution&quot;</span>);</div><div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;      load(height, <span class="stringliteral">&quot;height&quot;</span>);</div><div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;      loadVec(gfxX, <span class="stringliteral">&quot;graphicsSize&quot;</span>, 0);</div><div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;      loadVec(gfxY, <span class="stringliteral">&quot;graphicsSize&quot;</span>, 1);</div><div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;      loadVec(checkerX, <span class="stringliteral">&quot;checkers&quot;</span>, 0);</div><div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;      loadVec(checkerY, <span class="stringliteral">&quot;checkers&quot;</span>, 1);</div><div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a20c4e8286bb7880f186e0aa3fe5f103e">addCollisionPlane</a>(mu, resti, height, gfxX, gfxY, checkerX, checkerY,</div><div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;                        addGraphics);</div><div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (typeName == <span class="stringliteral">&quot;box&quot;</span>) {</div><div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;      <span class="keywordtype">double</span> mu, resti, depth, width, height, transparent;</div><div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;      <span class="keywordtype">double</span> pos[3];</div><div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;      <span class="keywordtype">double</span> <a class="code" href="../../da/d9b/namespaceori.html">ori</a>[3];</div><div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;      load(mu, <span class="stringliteral">&quot;mu&quot;</span>);</div><div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;      load(resti, <span class="stringliteral">&quot;restitution&quot;</span>);</div><div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;      load(depth, <span class="stringliteral">&quot;depth&quot;</span>);</div><div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;      load(width, <span class="stringliteral">&quot;width&quot;</span>);</div><div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;      load(height, <span class="stringliteral">&quot;height&quot;</span>);</div><div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;      loadArray(pos, <span class="stringliteral">&quot;position&quot;</span>, 3);</div><div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;      loadArray(ori, <span class="stringliteral">&quot;orientation&quot;</span>, 3);</div><div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;      load(transparent, <span class="stringliteral">&quot;transparent&quot;</span>);</div><div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160;</div><div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;      <a class="code" href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3&lt;double&gt;</a> R_box = <a class="code" href="../../da/d9b/namespaceori.html#add867f41c8046a8bba05611e25c8dfcd">ori::rpyToRotMat</a>(<a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a>(ori));</div><div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;      R_box.transposeInPlace();  <span class="comment">// collisionBox uses &quot;rotation&quot; matrix instead</span></div><div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;                                 <span class="comment">// of &quot;transformation&quot;</span></div><div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a33e67c5154f5fdbab0d49f23777f4313">addCollisionBox</a>(mu, resti, depth, width, height, <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a>(pos), R_box,</div><div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;                      addGraphics, transparent != 0.);</div><div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (typeName == <span class="stringliteral">&quot;stairs&quot;</span>) {</div><div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;      <span class="keywordtype">double</span> mu, resti, rise, run, stepsDouble, width, transparent;</div><div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;      <span class="keywordtype">double</span> pos[3];</div><div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;      <span class="keywordtype">double</span> <a class="code" href="../../da/d9b/namespaceori.html">ori</a>[3];</div><div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;      load(mu, <span class="stringliteral">&quot;mu&quot;</span>);</div><div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;      load(resti, <span class="stringliteral">&quot;restitution&quot;</span>);</div><div class="line"><a name="l00709"></a><span class="lineno">  709</span>&#160;      load(rise, <span class="stringliteral">&quot;rise&quot;</span>);</div><div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;      load(width, <span class="stringliteral">&quot;width&quot;</span>);</div><div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;      load(run, <span class="stringliteral">&quot;run&quot;</span>);</div><div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;      load(stepsDouble, <span class="stringliteral">&quot;steps&quot;</span>);</div><div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;      loadArray(pos, <span class="stringliteral">&quot;position&quot;</span>, 3);</div><div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;      loadArray(ori, <span class="stringliteral">&quot;orientation&quot;</span>, 3);</div><div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;      load(transparent, <span class="stringliteral">&quot;transparent&quot;</span>);</div><div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;</div><div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;      <a class="code" href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3&lt;double&gt;</a> R = <a class="code" href="../../da/d9b/namespaceori.html#add867f41c8046a8bba05611e25c8dfcd">ori::rpyToRotMat</a>(<a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a>(ori));</div><div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;      <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> pOff(pos);</div><div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;      R.transposeInPlace();  <span class="comment">// &quot;graphics&quot; rotation matrix</span></div><div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;</div><div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;      <span class="keywordtype">size_t</span> steps = (size_t)stepsDouble;</div><div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;</div><div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;      <span class="keywordtype">double</span> heightOffset = rise / 2;</div><div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;      <span class="keywordtype">double</span> runOffset = run / 2;</div><div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> <a class="code" href="../../dd/d14/class_simulation.html#a5474b99a1471e382b2e6a87adff814dc">step</a> = 0; <a class="code" href="../../dd/d14/class_simulation.html#a5474b99a1471e382b2e6a87adff814dc">step</a> &lt; steps; <a class="code" href="../../dd/d14/class_simulation.html#a5474b99a1471e382b2e6a87adff814dc">step</a>++) {</div><div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;        <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> p(runOffset, 0, heightOffset);</div><div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;        p = R * p + pOff;</div><div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;</div><div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;        <a class="code" href="../../dd/d14/class_simulation.html#a33e67c5154f5fdbab0d49f23777f4313">addCollisionBox</a>(mu, resti, run, width, heightOffset * 2, p, R,</div><div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;                        addGraphics, transparent != 0.);</div><div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;</div><div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;        heightOffset += rise / 2;</div><div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;        runOffset += run;</div><div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;      }</div><div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (typeName == <span class="stringliteral">&quot;mesh&quot;</span>) {</div><div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;      <span class="keywordtype">double</span> mu, resti, transparent, grid;</div><div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;      <a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;double&gt;</a> left_corner;</div><div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;      std::vector&lt;std::vector&lt;double&gt; &gt; height_map_2d;</div><div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;      load(mu, <span class="stringliteral">&quot;mu&quot;</span>);</div><div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;      load(resti, <span class="stringliteral">&quot;restitution&quot;</span>);</div><div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160;      load(transparent, <span class="stringliteral">&quot;transparent&quot;</span>);</div><div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;      load(grid, <span class="stringliteral">&quot;grid&quot;</span>);</div><div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;      loadVec(left_corner[0], <span class="stringliteral">&quot;left_corner_loc&quot;</span>, 0);</div><div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;      loadVec(left_corner[1], <span class="stringliteral">&quot;left_corner_loc&quot;</span>, 1);</div><div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;      loadVec(left_corner[2], <span class="stringliteral">&quot;left_corner_loc&quot;</span>, 2);</div><div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;</div><div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;      <span class="keywordtype">int</span> x_len(0);</div><div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;      <span class="keywordtype">int</span> y_len(0);</div><div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;      <span class="keywordtype">bool</span> file_input(<span class="keyword">false</span>);</div><div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;      paramHandler.getBoolean(key, <span class="stringliteral">&quot;heightmap_file&quot;</span>, file_input);</div><div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;      <span class="keywordflow">if</span> (file_input) {</div><div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;        <span class="comment">// Read from text file</span></div><div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;        std::string file_name;</div><div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;        paramHandler.getString(key, <span class="stringliteral">&quot;heightmap_file_name&quot;</span>, file_name);</div><div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;        std::ifstream f_height;</div><div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;        f_height.open(THIS_COM <span class="stringliteral">&quot;/config/&quot;</span> + file_name);</div><div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;        <span class="keywordflow">if</span> (!f_height.good()) {</div><div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;          std::cout &lt;&lt; <span class="stringliteral">&quot;file reading error: &quot;</span></div><div class="line"><a name="l00759"></a><span class="lineno">  759</span>&#160;                    &lt;&lt; THIS_COM <span class="stringliteral">&quot;../config/&quot;</span> + file_name &lt;&lt; std::endl;</div><div class="line"><a name="l00760"></a><span class="lineno">  760</span>&#160;        }</div><div class="line"><a name="l00761"></a><span class="lineno">  761</span>&#160;        <span class="keywordtype">int</span> i(0);</div><div class="line"><a name="l00762"></a><span class="lineno">  762</span>&#160;        <span class="keywordtype">int</span> j(0);</div><div class="line"><a name="l00763"></a><span class="lineno">  763</span>&#160;        <span class="keywordtype">double</span> tmp;</div><div class="line"><a name="l00764"></a><span class="lineno">  764</span>&#160;</div><div class="line"><a name="l00765"></a><span class="lineno">  765</span>&#160;        std::string line;</div><div class="line"><a name="l00766"></a><span class="lineno">  766</span>&#160;        std::vector&lt;double&gt; height_map_vec;</div><div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160;        <span class="keywordflow">while</span> (getline(f_height, line)) {</div><div class="line"><a name="l00768"></a><span class="lineno">  768</span>&#160;          std::istringstream iss(line);</div><div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;          j = 0;</div><div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;          <span class="keywordflow">while</span> (iss &gt;&gt; tmp) {</div><div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160;            height_map_vec.push_back(tmp);</div><div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;            ++j;</div><div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160;          }</div><div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160;          y_len = j;</div><div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;          height_map_2d.push_back(height_map_vec);</div><div class="line"><a name="l00776"></a><span class="lineno">  776</span>&#160;          height_map_vec.clear();</div><div class="line"><a name="l00777"></a><span class="lineno">  777</span>&#160;          <span class="comment">// printf(&quot;y len: %d\n&quot;, y_len);</span></div><div class="line"><a name="l00778"></a><span class="lineno">  778</span>&#160;          ++i;</div><div class="line"><a name="l00779"></a><span class="lineno">  779</span>&#160;        }</div><div class="line"><a name="l00780"></a><span class="lineno">  780</span>&#160;        x_len = i;</div><div class="line"><a name="l00781"></a><span class="lineno">  781</span>&#160;</div><div class="line"><a name="l00782"></a><span class="lineno">  782</span>&#160;      } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00783"></a><span class="lineno">  783</span>&#160;        paramHandler.get2DArray(key, <span class="stringliteral">&quot;height_map&quot;</span>, height_map_2d);</div><div class="line"><a name="l00784"></a><span class="lineno">  784</span>&#160;        x_len = height_map_2d.size();</div><div class="line"><a name="l00785"></a><span class="lineno">  785</span>&#160;        y_len = height_map_2d[0].size();</div><div class="line"><a name="l00786"></a><span class="lineno">  786</span>&#160;        <span class="comment">// printf(&quot;x, y len: %d, %d\n&quot;, x_len, y_len);</span></div><div class="line"><a name="l00787"></a><span class="lineno">  787</span>&#160;      }</div><div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160;</div><div class="line"><a name="l00789"></a><span class="lineno">  789</span>&#160;      <a class="code" href="../../d9/d8e/cpp_types_8h.html#a807200f3771dbd2cb2e4be52c5f2518c">DMat&lt;double&gt;</a> height_map(x_len, y_len);</div><div class="line"><a name="l00790"></a><span class="lineno">  790</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i(0); i &lt; x_len; ++i) {</div><div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j(0); j &lt; y_len; ++j) {</div><div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;          height_map(i, j) = height_map_2d[i][j];</div><div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;          <span class="comment">// printf(&quot;height (%d, %d) : %f\n&quot;, i, j, height_map(i,j) );</span></div><div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;        }</div><div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;      }</div><div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#afae53444e828ca1ce1a8b20d2f9fecc6">addCollisionMesh</a>(mu, resti, grid, left_corner, height_map, addGraphics,</div><div class="line"><a name="l00797"></a><span class="lineno">  797</span>&#160;                       transparent != 0.);</div><div class="line"><a name="l00798"></a><span class="lineno">  798</span>&#160;</div><div class="line"><a name="l00799"></a><span class="lineno">  799</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00800"></a><span class="lineno">  800</span>&#160;      <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;unknown terrain &quot;</span> + typeName);</div><div class="line"><a name="l00801"></a><span class="lineno">  801</span>&#160;    }</div><div class="line"><a name="l00802"></a><span class="lineno">  802</span>&#160;  }</div><div class="line"><a name="l00803"></a><span class="lineno">  803</span>&#160;}</div><div class="line"><a name="l00804"></a><span class="lineno">  804</span>&#160;</div><div class="line"><a name="l00805"></a><span class="lineno"><a class="line" href="../../dd/d14/class_simulation.html#a6186855f477a8b0add3cf41d5e5a6001">  805</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../dd/d14/class_simulation.html#a6186855f477a8b0add3cf41d5e5a6001">Simulation::updateGraphics</a>() {</div><div class="line"><a name="l00806"></a><span class="lineno">  806</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#adf2d9c22a32a995bf2a8505947ca6871">_robotControllerState</a>.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae42e1f0d68b89af761bcaf273b97bca7">bodyOrientation</a> =</div><div class="line"><a name="l00807"></a><span class="lineno">  807</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().robotToSim.mainCheetahVisualization.quat.cast&lt;<span class="keywordtype">double</span>&gt;();</div><div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#adf2d9c22a32a995bf2a8505947ca6871">_robotControllerState</a>.<a class="code" href="../../de/d75/struct_f_b_model_state.html#abbf400085816b6baa4e4a0597ac5b118">bodyPosition</a> =</div><div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160;      <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().robotToSim.mainCheetahVisualization.p.cast&lt;<span class="keywordtype">double</span>&gt;();</div><div class="line"><a name="l00810"></a><span class="lineno">  810</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 12; i++)</div><div class="line"><a name="l00811"></a><span class="lineno">  811</span>&#160;    <a class="code" href="../../dd/d14/class_simulation.html#adf2d9c22a32a995bf2a8505947ca6871">_robotControllerState</a>.<a class="code" href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">q</a>[i] =</div><div class="line"><a name="l00812"></a><span class="lineno">  812</span>&#160;        <a class="code" href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">_sharedMemory</a>().robotToSim.mainCheetahVisualization.q[i];</div><div class="line"><a name="l00813"></a><span class="lineno">  813</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#ad4e6dbc1efd77aff3fb32bad28df358e">_robotDataSimulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a1b185d90d2b15840ca57f8e2adcf84fb">setState</a>(<a class="code" href="../../dd/d14/class_simulation.html#adf2d9c22a32a995bf2a8505947ca6871">_robotControllerState</a>);</div><div class="line"><a name="l00814"></a><span class="lineno">  814</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#ad4e6dbc1efd77aff3fb32bad28df358e">_robotDataSimulator</a>-&gt;<a class="code" href="../../d7/d9c/class_dynamics_simulator.html#a3c057386e8d437e8c5dbcae02acf935c">forwardKinematics</a>();  <span class="comment">// calc all body positions</span></div><div class="line"><a name="l00815"></a><span class="lineno">  815</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#afab0fbc56961ba8e101a2b28188efd98">updateRobotFromModel</a>(*<a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>, <a class="code" href="../../dd/d14/class_simulation.html#a4cfbfd15921d8e09ab67d6149425061b">_simRobotID</a>, <span class="keyword">true</span>);</div><div class="line"><a name="l00816"></a><span class="lineno">  816</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#afab0fbc56961ba8e101a2b28188efd98">updateRobotFromModel</a>(*<a class="code" href="../../dd/d14/class_simulation.html#ad4e6dbc1efd77aff3fb32bad28df358e">_robotDataSimulator</a>,</div><div class="line"><a name="l00817"></a><span class="lineno">  817</span>&#160;                                          <a class="code" href="../../dd/d14/class_simulation.html#acd45041ed9262293f92d7928342ca4da">_controllerRobotID</a>, <span class="keyword">false</span>);</div><div class="line"><a name="l00818"></a><span class="lineno">  818</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;<a class="code" href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">_drawList</a>.<a class="code" href="../../d1/d03/class_draw_list.html#a551da4edf5a5774dcc79bf6e0edf2b2c">updateAdditionalInfo</a>(*<a class="code" href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">_simulator</a>);</div><div class="line"><a name="l00819"></a><span class="lineno">  819</span>&#160;  <a class="code" href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">_window</a>-&gt;update();</div><div class="line"><a name="l00820"></a><span class="lineno">  820</span>&#160;}</div><div class="ttc" id="class_spine_board_html_a99f95ce2c0ee9e9aef4c5f3343bc60d3"><div class="ttname"><a href="../../d1/da3/class_spine_board.html#a99f95ce2c0ee9e9aef4c5f3343bc60d3">SpineBoard::resetData</a></div><div class="ttdeci">void resetData()</div><div class="ttdef"><b>Definition:</b> <a href="../../de/d6d/_spine_board_8cpp_source.html#l00017">SpineBoard.cpp:17</a></div></div>
<div class="ttc" id="struct_f_b_model_state_html_abbf400085816b6baa4e4a0597ac5b118"><div class="ttname"><a href="../../de/d75/struct_f_b_model_state.html#abbf400085816b6baa4e4a0597ac5b118">FBModelState::bodyPosition</a></div><div class="ttdeci">Vec3&lt; T &gt; bodyPosition</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d9a/_floating_base_model_8h_source.html#l00041">FloatingBaseModel.h:41</a></div></div>
<div class="ttc" id="struct_spi_data_html_a61b173572d313d693cb37aa346cbd4b2"><div class="ttname"><a href="../../d5/d09/struct_spi_data.html#a61b173572d313d693cb37aa346cbd4b2">SpiData::q_knee</a></div><div class="ttdeci">float q_knee[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00037">SpineBoard.h:37</a></div></div>
<div class="ttc" id="class_simulation_html_a33e67c5154f5fdbab0d49f23777f4313"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a33e67c5154f5fdbab0d49f23777f4313">Simulation::addCollisionBox</a></div><div class="ttdeci">void addCollisionBox(double mu, double resti, double depth, double width, double height, const Vec3&lt; double &gt; &amp;pos, const Mat3&lt; double &gt; &amp;ori, bool addToWindow=true, bool transparent=true)</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d98/_simulation_8cpp_source.html#l00546">Simulation.cpp:546</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a590425b506eb87eff1a64ed14ffd1498">RobotType::MINI_CHEETAH</a></div></div>
<div class="ttc" id="class_draw_list_html_a7e274d87788b859c9099a6b398116304"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#a7e274d87788b859c9099a6b398116304">DrawList::addMesh</a></div><div class="ttdeci">void addMesh(double grid_size, const Vec3&lt; double &gt; &amp;left_corner, const DMat&lt; double &gt; &amp;height_map, bool transparent)</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d8b/_draw_list_8cpp_source.html#l00338">DrawList.cpp:338</a></div></div>
<div class="ttc" id="_control_parameter_interface_8h_html_ae6908d6ad8ae0bc7a200141e0c292508a592d3b9333f88bfabfaa2b00fb225ebb"><div class="ttname"><a href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508a592d3b9333f88bfabfaa2b00fb225ebb">ControlParameterRequestKind::SET_ROBOT_PARAM_BY_NAME</a></div></div>
<div class="ttc" id="class_draw_list_html_abd0bda993bf3d65a019abe27efbad85e"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#abd0bda993bf3d65a019abe27efbad85e">DrawList::_visualizationData</a></div><div class="ttdeci">VisualizationData * _visualizationData</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d65/_draw_list_8h_source.html#l00051">DrawList.h:51</a></div></div>
<div class="ttc" id="class_simulation_html_a34b590ee1fed73b2b6aaf3d2bcf3da0c"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a34b590ee1fed73b2b6aaf3d2bcf3da0c">Simulation::runAtSpeed</a></div><div class="ttdeci">void runAtSpeed(bool graphics=true)</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d98/_simulation_8cpp_source.html#l00579">Simulation.cpp:579</a></div></div>
<div class="ttc" id="class_simulation_html_a5474b99a1471e382b2e6a87adff814dc"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a5474b99a1471e382b2e6a87adff814dc">Simulation::step</a></div><div class="ttdeci">void step(double dt, double dtLowLevelControl, double dtHighLevelControl)</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d98/_simulation_8cpp_source.html#l00305">Simulation.cpp:305</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html_a3c057386e8d437e8c5dbcae02acf935c"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html#a3c057386e8d437e8c5dbcae02acf935c">DynamicsSimulator::forwardKinematics</a></div><div class="ttdeci">void forwardKinematics()</div><div class="ttdoc">Do forward kinematics for feet. </div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00053">DynamicsSimulator.h:53</a></div></div>
<div class="ttc" id="class_control_parameters_html_ab42dff0f07e88bf44c831238dd4ce96f"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html#ab42dff0f07e88bf44c831238dd4ce96f">ControlParameters::collection</a></div><div class="ttdeci">ControlParameterCollection collection</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00441">ControlParameters.h:441</a></div></div>
<div class="ttc" id="struct_f_b_model_state_html_abf1fc0221d6b92d103193524a2046ffc"><div class="ttname"><a href="../../de/d75/struct_f_b_model_state.html#abf1fc0221d6b92d103193524a2046ffc">FBModelState::bodyVelocity</a></div><div class="ttdeci">SVec&lt; T &gt; bodyVelocity</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d9a/_floating_base_model_8h_source.html#l00042">FloatingBaseModel.h:42</a></div></div>
<div class="ttc" id="class_timer_html"><div class="ttname"><a href="../../d8/d08/class_timer.html">Timer</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d29/_timer_8h_source.html#l00012">Timer.h:12</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html">DynamicsSimulator&lt; double &gt;</a></div></div>
<div class="ttc" id="namespaceori_html_a537b8d0769c03e4cd8ef2b9a9dc8a760"><div class="ttname"><a href="../../da/d9b/namespaceori.html#a537b8d0769c03e4cd8ef2b9a9dc8a760">ori::coordinateRotation</a></div><div class="ttdeci">Mat3&lt; T &gt; coordinateRotation(CoordinateAxis axis, T theta)</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/dfb/orientation__tools_8h_source.html#l00060">orientation_tools.h:60</a></div></div>
<div class="ttc" id="struct_control_parameter_request_html_ab47135adbd2c1249dfa24d264732a76f"><div class="ttname"><a href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">ControlParameterRequest::parameterKind</a></div><div class="ttdeci">ControlParameterValueKind parameterKind</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00031">ControlParameterInterface.h:31</a></div></div>
<div class="ttc" id="struct_robot_homing_info_html_a1703b27800fa38b4638bff2189bbe4cc"><div class="ttname"><a href="../../dc/d77/struct_robot_homing_info.html#a1703b27800fa38b4638bff2189bbe4cc">RobotHomingInfo::position</a></div><div class="ttdeci">EIGEN_MAKE_ALIGNED_OPERATOR_NEW Vec3&lt; T &gt; position</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00027">DynamicsSimulator.h:27</a></div></div>
<div class="ttc" id="class_spine_board_html_aa14a53c2ee68bf08c9a0e81071f88d0e"><div class="ttname"><a href="../../d1/da3/class_spine_board.html#aa14a53c2ee68bf08c9a0e81071f88d0e">SpineBoard::cmd</a></div><div class="ttdeci">SpiCommand * cmd</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00052">SpineBoard.h:52</a></div></div>
<div class="ttc" id="_control_parameters_8h_html_a09b572cf97f12b378290dee549d8ecc3"><div class="ttname"><a href="../../d2/d01/_control_parameters_8h.html#a09b572cf97f12b378290dee549d8ecc3">ControlParameterValueKind</a></div><div class="ttdeci">ControlParameterValueKind</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00034">ControlParameters.h:34</a></div></div>
<div class="ttc" id="class_imu_simulator_html_aadd00de99602f7c66cba555527bf3294"><div class="ttname"><a href="../../d8/da4/class_imu_simulator.html#aadd00de99602f7c66cba555527bf3294">ImuSimulator::updateCheaterState</a></div><div class="ttdeci">void updateCheaterState(const FBModelState&lt; T &gt; &amp;robotState, const FBModelStateDerivative&lt; T &gt; &amp;robotStateD, CheaterState&lt; T &gt; &amp;state)</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d6a/_imu_simulator_8cpp_source.html#l00074">ImuSimulator.cpp:74</a></div></div>
<div class="ttc" id="namespaceori_html_add867f41c8046a8bba05611e25c8dfcd"><div class="ttname"><a href="../../da/d9b/namespaceori.html#add867f41c8046a8bba05611e25c8dfcd">ori::rpyToRotMat</a></div><div class="ttdeci">Mat3&lt; typename T::Scalar &gt; rpyToRotMat(const Eigen::MatrixBase&lt; T &gt; &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/dfb/orientation__tools_8h_source.html#l00083">orientation_tools.h:83</a></div></div>
<div class="ttc" id="class_quadruped_html"><div class="ttname"><a href="../../dc/d66/class_quadruped.html">Quadruped</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/dc7/_quadruped_8h_source.html#l00056">Quadruped.h:56</a></div></div>
<div class="ttc" id="class_quadruped_html_a2b1208249b4fa5e9dc3b08916fae04c7"><div class="ttname"><a href="../../dc/d66/class_quadruped.html#a2b1208249b4fa5e9dc3b08916fae04c7">Quadruped::_hipLinkLength</a></div><div class="ttdeci">T _hipLinkLength</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/dc7/_quadruped_8h_source.html#l00062">Quadruped.h:62</a></div></div>
<div class="ttc" id="class_control_parameters_html"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html">ControlParameters</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00391">ControlParameters.h:391</a></div></div>
<div class="ttc" id="class_control_parameters_html_af025ae2e93e63f23e77802189bfbc0af"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html#af025ae2e93e63f23e77802189bfbc0af">ControlParameters::unlockMutex</a></div><div class="ttdeci">void unlockMutex()</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00430">ControlParameters.h:430</a></div></div>
<div class="ttc" id="_simulation_8h_html"><div class="ttname"><a href="../../d2/ded/_simulation_8h.html">Simulation.h</a></div><div class="ttdoc">Main simulation class. </div></div>
<div class="ttc" id="class_control_parameter_collection_html_a10baad903728358f310f523c45e0326c"><div class="ttname"><a href="../../dd/da1/class_control_parameter_collection.html#a10baad903728358f310f523c45e0326c">ControlParameterCollection::_map</a></div><div class="ttdeci">std::map&lt; std::string, ControlParameter * &gt; _map</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00114">ControlParameters.h:114</a></div></div>
<div class="ttc" id="class_simulation_html_afae53444e828ca1ce1a8b20d2f9fecc6"><div class="ttname"><a href="../../dd/d14/class_simulation.html#afae53444e828ca1ce1a8b20d2f9fecc6">Simulation::addCollisionMesh</a></div><div class="ttdeci">void addCollisionMesh(double mu, double resti, double grid_size, const Vec3&lt; double &gt; &amp;left_corner_loc, const DMat&lt; double &gt; &amp;height_map, bool addToWindow=true, bool transparent=true)</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d98/_simulation_8cpp_source.html#l00559">Simulation.cpp:559</a></div></div>
<div class="ttc" id="class_simulation_html_af1e50315d809d3306564abf7225f6864"><div class="ttname"><a href="../../dd/d14/class_simulation.html#af1e50315d809d3306564abf7225f6864">Simulation::_actuatorModels</a></div><div class="ttdeci">std::vector&lt; ActuatorModel&lt; double &gt; &gt; _actuatorModels</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00135">Simulation.h:135</a></div></div>
<div class="ttc" id="cpp_types_8h_html_aa8cb424e643d476ea485238dad7c3e18"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 3 &gt; Mat3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00054">cppTypes.h:54</a></div></div>
<div class="ttc" id="class_simulation_html_a04559087d745de92a850e2c490d4981d"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a04559087d745de92a850e2c490d4981d">Simulation::highLevelControl</a></div><div class="ttdeci">void highLevelControl()</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d98/_simulation_8cpp_source.html#l00398">Simulation.cpp:398</a></div></div>
<div class="ttc" id="_quadruped_8h_html"><div class="ttname"><a href="../../d3/dc7/_quadruped_8h.html">Quadruped.h</a></div><div class="ttdoc">Data structure containing parameters for quadruped robot. </div></div>
<div class="ttc" id="class_simulation_html_abb36e526299957c7f879d350e0a0c75a"><div class="ttname"><a href="../../dd/d14/class_simulation.html#abb36e526299957c7f879d350e0a0c75a">Simulation::_connected</a></div><div class="ttdeci">bool _connected</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00143">Simulation.h:143</a></div></div>
<div class="ttc" id="_simulator_parameters_8h_html_a7e57f99279ad4c4bef21220b9f09e768"><div class="ttname"><a href="../../d2/dc1/_simulator_parameters_8h.html#a7e57f99279ad4c4bef21220b9f09e768">MINI_CHEETAH_DEFAULT_PARAMETERS</a></div><div class="ttdeci">#define MINI_CHEETAH_DEFAULT_PARAMETERS</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/dc1/_simulator_parameters_8h_source.html#l00015">SimulatorParameters.h:15</a></div></div>
<div class="ttc" id="class_t_i___board_control_html_a3e42e3be8465ec6bd30fae50975a41f6"><div class="ttname"><a href="../../d4/d1a/class_t_i___board_control.html#a3e42e3be8465ec6bd30fae50975a41f6">TI_BoardControl::reset_ti_board_data</a></div><div class="ttdeci">void reset_ti_board_data()</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d31/ti__boardcontrol_8cpp_source.html#l00021">ti_boardcontrol.cpp:21</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a807200f3771dbd2cb2e4be52c5f2518c"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a807200f3771dbd2cb2e4be52c5f2518c">DMat</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, Eigen::Dynamic, Eigen::Dynamic &gt; DMat</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00106">cppTypes.h:106</a></div></div>
<div class="ttc" id="class_simulation_html_a6186855f477a8b0add3cf41d5e5a6001"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a6186855f477a8b0add3cf41d5e5a6001">Simulation::updateGraphics</a></div><div class="ttdeci">void updateGraphics()</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d98/_simulation_8cpp_source.html#l00805">Simulation.cpp:805</a></div></div>
<div class="ttc" id="class_graphics3_d_html_a49c53912e2868ee7d93cb0a3ed6d0f4b"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html#a49c53912e2868ee7d93cb0a3ed6d0f4b">Graphics3D::setupMiniCheetah</a></div><div class="ttdeci">size_t setupMiniCheetah(Vec4&lt; float &gt; color, bool useOld)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d90/_graphics3_d_8cpp_source.html#l00122">Graphics3D.cpp:122</a></div></div>
<div class="ttc" id="class_control_parameters_html_a12b144b3d659080b6e0bfd93569b566e"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html#a12b144b3d659080b6e0bfd93569b566e">ControlParameters::isFullyInitialized</a></div><div class="ttdeci">bool isFullyInitialized()</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00403">ControlParameters.h:403</a></div></div>
<div class="ttc" id="class_simulation_html_a1a4397660fa821c19c2bcc75662106ae"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a1a4397660fa821c19c2bcc75662106ae">Simulation::_robotMutex</a></div><div class="ttdeci">std::mutex _robotMutex</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00119">Simulation.h:119</a></div></div>
<div class="ttc" id="struct_f_b_model_state_html_ae5a66b0d3fecb2cdd9ee3c68f72e9182"><div class="ttname"><a href="../../de/d75/struct_f_b_model_state.html#ae5a66b0d3fecb2cdd9ee3c68f72e9182">FBModelState::q</a></div><div class="ttdeci">DVec&lt; T &gt; q</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d9a/_floating_base_model_8h_source.html#l00043">FloatingBaseModel.h:43</a></div></div>
<div class="ttc" id="class_simulation_html_acfb66e9a45bf3c99747d271418f34bfe"><div class="ttname"><a href="../../dd/d14/class_simulation.html#acfb66e9a45bf3c99747d271418f34bfe">Simulation::lowLevelControl</a></div><div class="ttdeci">void lowLevelControl()</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d98/_simulation_8cpp_source.html#l00360">Simulation.cpp:360</a></div></div>
<div class="ttc" id="struct_f_b_model_state_html_a97f42a6014fc5d9fd3dc22f7158099f4"><div class="ttname"><a href="../../de/d75/struct_f_b_model_state.html#a97f42a6014fc5d9fd3dc22f7158099f4">FBModelState::qd</a></div><div class="ttdeci">DVec&lt; T &gt; qd</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d9a/_floating_base_model_8h_source.html#l00044">FloatingBaseModel.h:44</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="class_graphics3_d_html"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html">Graphics3D</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de7/_graphics3_d_8h_source.html#l00033">Graphics3D.h:33</a></div></div>
<div class="ttc" id="class_timer_html_a3a8b5272198d029779dc9302a54305a8"><div class="ttname"><a href="../../d8/d08/class_timer.html#a3a8b5272198d029779dc9302a54305a8">Timer::start</a></div><div class="ttdeci">void start()</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d29/_timer_8h_source.html#l00016">Timer.h:16</a></div></div>
<div class="ttc" id="class_simulation_html_af206908794036d14ba5c4c1d19779588"><div class="ttname"><a href="../../dd/d14/class_simulation.html#af206908794036d14ba5c4c1d19779588">Simulation::_tiBoards</a></div><div class="ttdeci">TI_BoardControl _tiBoards[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00139">Simulation.h:139</a></div></div>
<div class="ttc" id="class_simulation_html_aacbbe2c5f5d30f4029427156a8aec07f"><div class="ttname"><a href="../../dd/d14/class_simulation.html#aacbbe2c5f5d30f4029427156a8aec07f">Simulation::_window</a></div><div class="ttdeci">Graphics3D * _window</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00127">Simulation.h:127</a></div></div>
<div class="ttc" id="struct_control_parameter_request_html_ad991ed9045c129311774dc9ac4c97de7"><div class="ttname"><a href="../../d6/d6d/struct_control_parameter_request.html#ad991ed9045c129311774dc9ac4c97de7">ControlParameterRequest::requestKind</a></div><div class="ttdeci">ControlParameterRequestKind requestKind</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00032">ControlParameterInterface.h:32</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html_a9afb9649511f0eb19f953bf470d80252"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html#a9afb9649511f0eb19f953bf470d80252">DynamicsSimulator::getContactForce</a></div><div class="ttdeci">const Vec3&lt; T &gt; &amp; getContactForce(size_t idx)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00114">DynamicsSimulator.h:114</a></div></div>
<div class="ttc" id="_simulator_message_8h_html_a486e39cd4b287080b175f8736f67de4facd6102c4e0e339658526415ee06ad67d"><div class="ttname"><a href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4facd6102c4e0e339658526415ee06ad67d">SimulatorMode::DO_NOTHING</a></div></div>
<div class="ttc" id="class_simulation_html_a3539cffbf755425b0c26edcb3cdb4200"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a3539cffbf755425b0c26edcb3cdb4200">Simulation::_sharedMemory</a></div><div class="ttdeci">SharedMemoryObject&lt; SimulatorSyncronizedMessage &gt; _sharedMemory</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00120">Simulation.h:120</a></div></div>
<div class="ttc" id="class_simulation_html_ad4e6dbc1efd77aff3fb32bad28df358e"><div class="ttname"><a href="../../dd/d14/class_simulation.html#ad4e6dbc1efd77aff3fb32bad28df358e">Simulation::_robotDataSimulator</a></div><div class="ttdeci">DynamicsSimulator&lt; double &gt; * _robotDataSimulator</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00134">Simulation.h:134</a></div></div>
<div class="ttc" id="_control_parameter_interface_8h_html_ae6908d6ad8ae0bc7a200141e0c292508a7cd01036768fe3a9f7f5cccc148f833e"><div class="ttname"><a href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508a7cd01036768fe3a9f7f5cccc148f833e">ControlParameterRequestKind::SET_USER_PARAM_BY_NAME</a></div></div>
<div class="ttc" id="class_quadruped_html_ae752ca0d75b7e1ae759c1285be62d068"><div class="ttname"><a href="../../dc/d66/class_quadruped.html#ae752ca0d75b7e1ae759c1285be62d068">Quadruped::_kneeLinkLength</a></div><div class="ttdeci">T _kneeLinkLength</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/dc7/_quadruped_8h_source.html#l00062">Quadruped.h:62</a></div></div>
<div class="ttc" id="_simulation_8h_html_a4dc49651cc087f6a9b07bf5f500da7bb"><div class="ttname"><a href="../../d2/ded/_simulation_8h.html#a4dc49651cc087f6a9b07bf5f500da7bb">SIM_LCM_NAME</a></div><div class="ttdeci">#define SIM_LCM_NAME</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00031">Simulation.h:31</a></div></div>
<div class="ttc" id="struct_spi_data_html_a55471fdb44f070c4e9c6ef4b128d0f9c"><div class="ttname"><a href="../../d5/d09/struct_spi_data.html#a55471fdb44f070c4e9c6ef4b128d0f9c">SpiData::q_hip</a></div><div class="ttdeci">float q_hip[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00036">SpineBoard.h:36</a></div></div>
<div class="ttc" id="class_simulation_html_ab264f11e0f5fc0e601644f1c9e8ced64"><div class="ttname"><a href="../../dd/d14/class_simulation.html#ab264f11e0f5fc0e601644f1c9e8ced64">Simulation::firstRun</a></div><div class="ttdeci">void firstRun()</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d98/_simulation_8cpp_source.html#l00268">Simulation.cpp:268</a></div></div>
<div class="ttc" id="union_control_parameter_value_html"><div class="ttname"><a href="../../df/df2/union_control_parameter_value.html">ControlParameterValue</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00055">ControlParameters.h:55</a></div></div>
<div class="ttc" id="class_draw_list_html_afab0fbc56961ba8e101a2b28188efd98"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#afab0fbc56961ba8e101a2b28188efd98">DrawList::updateRobotFromModel</a></div><div class="ttdeci">void updateRobotFromModel(DynamicsSimulator&lt; T &gt; &amp;model, size_t id, bool updateOrigin=false)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d65/_draw_list_8h_source.html#l00170">DrawList.h:170</a></div></div>
<div class="ttc" id="class_spine_board_html_af87f98dae049bafb3f9629609fb611e5"><div class="ttname"><a href="../../d1/da3/class_spine_board.html#af87f98dae049bafb3f9629609fb611e5">SpineBoard::init</a></div><div class="ttdeci">void init(float side_sign, s32 board)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/d6d/_spine_board_8cpp_source.html#l00008">SpineBoard.cpp:8</a></div></div>
<div class="ttc" id="class_simulation_html_ad3b3a11e3a8d6e2119dbcf538802d5cf"><div class="ttname"><a href="../../dd/d14/class_simulation.html#ad3b3a11e3a8d6e2119dbcf538802d5cf">Simulation::loadTerrainFile</a></div><div class="ttdeci">void loadTerrainFile(const std::string &amp;terrainFileName, bool addGraphics=true)</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d98/_simulation_8cpp_source.html#l00638">Simulation.cpp:638</a></div></div>
<div class="ttc" id="class_graphics3_d_html_a03c04c83e3710bf6812a4e7be4d359cf"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html#a03c04c83e3710bf6812a4e7be4d359cf">Graphics3D::IsPaused</a></div><div class="ttdeci">bool IsPaused()</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de7/_graphics3_d_8h_source.html#l00056">Graphics3D.h:56</a></div></div>
<div class="ttc" id="class_simulation_html_a4ca599c328bca7c738355b97ebf76337"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a4ca599c328bca7c738355b97ebf76337">Simulation::_tau</a></div><div class="ttdeci">DVec&lt; double &gt; _tau</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00132">Simulation.h:132</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html_a1b185d90d2b15840ca57f8e2adcf84fb"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html#a1b185d90d2b15840ca57f8e2adcf84fb">DynamicsSimulator::setState</a></div><div class="ttdeci">void setState(const FBModelState&lt; T &gt; &amp;state)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00061">DynamicsSimulator.h:61</a></div></div>
<div class="ttc" id="struct_robot_homing_info_html_a2e3ebe7ba69ff8774f21e81b925f4c2c"><div class="ttname"><a href="../../dc/d77/struct_robot_homing_info.html#a2e3ebe7ba69ff8774f21e81b925f4c2c">RobotHomingInfo::kd_ang</a></div><div class="ttdeci">double kd_ang</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00032">DynamicsSimulator.h:32</a></div></div>
<div class="ttc" id="class_simulation_html_abb7498934699436a95c29b400df699e9"><div class="ttname"><a href="../../dd/d14/class_simulation.html#abb7498934699436a95c29b400df699e9">Simulation::_robotParams</a></div><div class="ttdeci">RobotControlParameters _robotParams</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00124">Simulation.h:124</a></div></div>
<div class="ttc" id="struct_control_parameter_request_html_ad03bd9ffd8b4ed1dbcdd72a07fabc2d3"><div class="ttname"><a href="../../d6/d6d/struct_control_parameter_request.html#ad03bd9ffd8b4ed1dbcdd72a07fabc2d3">ControlParameterRequest::name</a></div><div class="ttdeci">char name[CONTROL_PARAMETER_MAXIMUM_NAME_LENGTH]</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00027">ControlParameterInterface.h:27</a></div></div>
<div class="ttc" id="class_t_i___board_control_html_a71d83e45bced344c5c8dc8df039cfc50"><div class="ttname"><a href="../../d4/d1a/class_t_i___board_control.html#a71d83e45bced344c5c8dc8df039cfc50">TI_BoardControl::set_link_lengths</a></div><div class="ttdeci">void set_link_lengths(float l1, float l2, float l3)</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d31/ti__boardcontrol_8cpp_source.html#l00014">ti_boardcontrol.cpp:14</a></div></div>
<div class="ttc" id="utilities_8h_html_aa3945f023f4c554ec5670ac03ff82525"><div class="ttname"><a href="../../de/df0/utilities_8h.html#aa3945f023f4c554ec5670ac03ff82525">getLcmUrl</a></div><div class="ttdeci">std::string getLcmUrl(s64 ttl)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/da5/utilities_8cpp_source.html#l00032">utilities.cpp:32</a></div></div>
<div class="ttc" id="class_simulation_html_a4cfbfd15921d8e09ab67d6149425061b"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a4cfbfd15921d8e09ab67d6149425061b">Simulation::_simRobotID</a></div><div class="ttdeci">size_t _simRobotID</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00126">Simulation.h:126</a></div></div>
<div class="ttc" id="class_t_i___board_control_html_a9c8430956bc19a3fa44d433c85d7ef09"><div class="ttname"><a href="../../d4/d1a/class_t_i___board_control.html#a9c8430956bc19a3fa44d433c85d7ef09">TI_BoardControl::reset_ti_board_command</a></div><div class="ttdeci">void reset_ti_board_command()</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d31/ti__boardcontrol_8cpp_source.html#l00028">ti_boardcontrol.cpp:28</a></div></div>
<div class="ttc" id="class_graphics3_d_html_a2ded7e2e203f7d660f4120e0b9e3ed61"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html#a2ded7e2e203f7d660f4120e0b9e3ed61">Graphics3D::setupCheetah3</a></div><div class="ttdeci">size_t setupCheetah3(Vec4&lt; float &gt; color, bool useOld)</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d90/_graphics3_d_8cpp_source.html#l00117">Graphics3D.cpp:117</a></div></div>
<div class="ttc" id="class_simulation_html_aba2b5400e0985d7d0db4d47baeb14787"><div class="ttname"><a href="../../dd/d14/class_simulation.html#aba2b5400e0985d7d0db4d47baeb14787">Simulation::_running</a></div><div class="ttdeci">bool _running</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00142">Simulation.h:142</a></div></div>
<div class="ttc" id="class_draw_list_html_a9c2c9531b2de18e928fc8d0d20cfb4c7"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#a9c2c9531b2de18e928fc8d0d20cfb4c7">DrawList::addBox</a></div><div class="ttdeci">void addBox(double depth, double width, double height, const Vec3&lt; double &gt; &amp;pos, const Mat3&lt; double &gt; &amp;ori, bool transparent)</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d8b/_draw_list_8cpp_source.html#l00288">DrawList.cpp:288</a></div></div>
<div class="ttc" id="utilities_8h_html_afe1bbec53e0ac370224c4aa5c3433b0e"><div class="ttname"><a href="../../de/df0/utilities_8h.html#afe1bbec53e0ac370224c4aa5c3433b0e">getConfigDirectoryPath</a></div><div class="ttdeci">std::string getConfigDirectoryPath()</div><div class="ttdef"><b>Definition:</b> <a href="../../de/da5/utilities_8cpp_source.html#l00030">utilities.cpp:30</a></div></div>
<div class="ttc" id="class_simulation_html_a20c4e8286bb7880f186e0aa3fe5f103e"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a20c4e8286bb7880f186e0aa3fe5f103e">Simulation::addCollisionPlane</a></div><div class="ttdeci">void addCollisionPlane(double mu, double resti, double height, double sizeX=20, double sizeY=20, double checkerX=40, double checkerY=40, bool addToWindow=true)</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d98/_simulation_8cpp_source.html#l00520">Simulation.cpp:520</a></div></div>
<div class="ttc" id="struct_control_parameter_response_html_a92b038f05343b0724848ed37b70c59cc"><div class="ttname"><a href="../../d4/d34/struct_control_parameter_response.html#a92b038f05343b0724848ed37b70c59cc">ControlParameterResponse::parameterKind</a></div><div class="ttdeci">ControlParameterValueKind parameterKind</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00068">ControlParameterInterface.h:68</a></div></div>
<div class="ttc" id="class_simulation_html_ad1fa8b0ac8786fd394a822547c507d48"><div class="ttname"><a href="../../dd/d14/class_simulation.html#ad1fa8b0ac8786fd394a822547c507d48">Simulation::_spiData</a></div><div class="ttdeci">SpiData _spiData</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00137">Simulation.h:137</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html_a3ae2854bcabc457357f541359a1c2075"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html#a3ae2854bcabc457357f541359a1c2075">DynamicsSimulator::addCollisionMesh</a></div><div class="ttdeci">void addCollisionMesh(T mu, T rest, T grid_size, const Vec3&lt; T &gt; &amp;left_corner_loc, const DMat&lt; T &gt; &amp;height_map)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00104">DynamicsSimulator.h:104</a></div></div>
<div class="ttc" id="class_simulation_html_af713a3529e71a04c0b832dd2e10591fb"><div class="ttname"><a href="../../dd/d14/class_simulation.html#af713a3529e71a04c0b832dd2e10591fb">Simulation::_quadruped</a></div><div class="ttdeci">Quadruped&lt; double &gt; _quadruped</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00128">Simulation.h:128</a></div></div>
<div class="ttc" id="_shared_memory_8h_html_a81248e6de8785a7320f0ae3d455c0298"><div class="ttname"><a href="../../d2/dac/_shared_memory_8h.html#a81248e6de8785a7320f0ae3d455c0298">DEVELOPMENT_SIMULATOR_SHARED_MEMORY_NAME</a></div><div class="ttdeci">#define DEVELOPMENT_SIMULATOR_SHARED_MEMORY_NAME</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/dac/_shared_memory_8h_source.html#l00021">SharedMemory.h:21</a></div></div>
<div class="ttc" id="class_simulation_html_ad20996d43bb2265500b4edb5fcb00dc6"><div class="ttname"><a href="../../dd/d14/class_simulation.html#ad20996d43bb2265500b4edb5fcb00dc6">Simulation::buildLcmMessage</a></div><div class="ttdeci">void buildLcmMessage()</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d98/_simulation_8cpp_source.html#l00472">Simulation.cpp:472</a></div></div>
<div class="ttc" id="c_types_8h_html_afaa62991928fb9fb18ff0db62a040aba"><div class="ttname"><a href="../../d0/d99/c_types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a></div><div class="ttdeci">uint32_t u32</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d99/c_types_8h_source.html#l00018">cTypes.h:18</a></div></div>
<div class="ttc" id="class_simulation_html_a8a3a6fa9691b58d5dc614d98b8e4fefb"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a8a3a6fa9691b58d5dc614d98b8e4fefb">Simulation::setRobotState</a></div><div class="ttdeci">void setRobotState(FBModelState&lt; double &gt; &amp;state)</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00048">Simulation.h:48</a></div></div>
<div class="ttc" id="struct_control_parameter_response_html_ac73006eb720e25486d3937bdf2657c2c"><div class="ttname"><a href="../../d4/d34/struct_control_parameter_response.html#ac73006eb720e25486d3937bdf2657c2c">ControlParameterResponse::requestNumber</a></div><div class="ttdeci">u64 requestNumber</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00065">ControlParameterInterface.h:65</a></div></div>
<div class="ttc" id="class_timer_html_aa42cb0519d30540b49a8c73f8ea81470"><div class="ttname"><a href="../../d8/d08/class_timer.html#aa42cb0519d30540b49a8c73f8ea81470">Timer::getSeconds</a></div><div class="ttdeci">double getSeconds()</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d29/_timer_8h_source.html#l00027">Timer.h:27</a></div></div>
<div class="ttc" id="class_simulation_html_afef7938d79bfa913a86ff4b4448d9ae7"><div class="ttname"><a href="../../dd/d14/class_simulation.html#afef7938d79bfa913a86ff4b4448d9ae7">Simulation::_timeOfNextLowLevelControl</a></div><div class="ttdeci">double _timeOfNextLowLevelControl</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00147">Simulation.h:147</a></div></div>
<div class="ttc" id="class_shared_memory_object_html_a6b21aa9ce01bcd55504953446dc2ab2b"><div class="ttname"><a href="../../d1/d8d/class_shared_memory_object.html#a6b21aa9ce01bcd55504953446dc2ab2b">SharedMemoryObject::createNew</a></div><div class="ttdeci">bool createNew(const std::string &amp;name, bool allowOverwrite=false)</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/dac/_shared_memory_8h_source.html#l00125">SharedMemory.h:125</a></div></div>
<div class="ttc" id="class_simulation_html_ae1f3a65499126d5d527500dd221300a4"><div class="ttname"><a href="../../dd/d14/class_simulation.html#ae1f3a65499126d5d527500dd221300a4">Simulation::_highLevelIterations</a></div><div class="ttdeci">s64 _highLevelIterations</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00149">Simulation.h:149</a></div></div>
<div class="ttc" id="class_control_parameters_html_a8f614fa95d472922d65efe48238a7afc"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html#a8f614fa95d472922d65efe48238a7afc">ControlParameters::lockMutex</a></div><div class="ttdeci">void lockMutex()</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00428">ControlParameters.h:428</a></div></div>
<div class="ttc" id="class_imu_simulator_html_a1c6eaa5dfe26a97bdfeec6b58cad0ad4"><div class="ttname"><a href="../../d8/da4/class_imu_simulator.html#a1c6eaa5dfe26a97bdfeec6b58cad0ad4">ImuSimulator::updateVectornav</a></div><div class="ttdeci">void updateVectornav(const FBModelState&lt; T &gt; &amp;robotState, const FBModelStateDerivative&lt; T &gt; &amp;robotStateD, VectorNavData *data)</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d6a/_imu_simulator_8cpp_source.html#l00028">ImuSimulator.cpp:28</a></div></div>
<div class="ttc" id="namespaceori_html_add76bed815809cbebd38a8596b0f6224"><div class="ttname"><a href="../../da/d9b/namespaceori.html#add76bed815809cbebd38a8596b0f6224">ori::quatToRPY</a></div><div class="ttdeci">Vec3&lt; typename T::Scalar &gt; quatToRPY(const Eigen::MatrixBase&lt; T &gt; &amp;q)</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/dfb/orientation__tools_8h_source.html#l00185">orientation_tools.h:185</a></div></div>
<div class="ttc" id="struct_ti_board_data_html_abbd604ce0592a16aeff781483306034f"><div class="ttname"><a href="../../de/de1/struct_ti_board_data.html#abbd604ce0592a16aeff781483306034f">TiBoardData::q</a></div><div class="ttdeci">float q[3]</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00024">ti_boardcontrol.h:24</a></div></div>
<div class="ttc" id="struct_f_b_model_state_html"><div class="ttname"><a href="../../de/d75/struct_f_b_model_state.html">FBModelState&lt; double &gt;</a></div></div>
<div class="ttc" id="class_simulation_html_a846c1153eb5f89deea68886b1faea5b9"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a846c1153eb5f89deea68886b1faea5b9">Simulation::_spiCommand</a></div><div class="ttdeci">SpiCommand _spiCommand</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00136">Simulation.h:136</a></div></div>
<div class="ttc" id="class_simulation_html_abfe1f6283d725c294a80ec8cebaa854f"><div class="ttname"><a href="../../dd/d14/class_simulation.html#abfe1f6283d725c294a80ec8cebaa854f">Simulation::_spineBoards</a></div><div class="ttdeci">SpineBoard _spineBoards[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00138">Simulation.h:138</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html_a339504f4bd9866588fd73b2fc0fbab0d"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html#a339504f4bd9866588fd73b2fc0fbab0d">DynamicsSimulator::setHoming</a></div><div class="ttdeci">void setHoming(const RobotHomingInfo&lt; T &gt; &amp;homing)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00066">DynamicsSimulator.h:66</a></div></div>
<div class="ttc" id="class_simulation_html_a4053d346b6dd8e1b49e26625aa782eb3"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a4053d346b6dd8e1b49e26625aa782eb3">Simulation::_robot</a></div><div class="ttdeci">RobotType _robot</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00140">Simulation.h:140</a></div></div>
<div class="ttc" id="struct_robot_homing_info_html_aa1edeee5c09e12e166c04c1d0b1e3fb8"><div class="ttname"><a href="../../dc/d77/struct_robot_homing_info.html#aa1edeee5c09e12e166c04c1d0b1e3fb8">RobotHomingInfo::kp_lin</a></div><div class="ttdeci">double kp_lin</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00029">DynamicsSimulator.h:29</a></div></div>
<div class="ttc" id="class_t_i___board_control_html_a74d8da6940a7d241f14b14938fa896a1"><div class="ttname"><a href="../../d4/d1a/class_t_i___board_control.html#a74d8da6940a7d241f14b14938fa896a1">TI_BoardControl::init</a></div><div class="ttdeci">void init(float side_sign)</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d31/ti__boardcontrol_8cpp_source.html#l00007">ti_boardcontrol.cpp:7</a></div></div>
<div class="ttc" id="class_t_i___board_control_html_a9365069ffa74df468313b55d24d4fcce"><div class="ttname"><a href="../../d4/d1a/class_t_i___board_control.html#a9365069ffa74df468313b55d24d4fcce">TI_BoardControl::data</a></div><div class="ttdeci">TiBoardData * data</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00045">ti_boardcontrol.h:45</a></div></div>
<div class="ttc" id="class_spine_board_html_ab9ad96d3ede3c640ca73af2d4c5208e7"><div class="ttname"><a href="../../d1/da3/class_spine_board.html#ab9ad96d3ede3c640ca73af2d4c5208e7">SpineBoard::data</a></div><div class="ttdeci">SpiData * data</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00053">SpineBoard.h:53</a></div></div>
<div class="ttc" id="class_simulation_html_af97dee243877316b7e78ba6d56a3cd2f"><div class="ttname"><a href="../../dd/d14/class_simulation.html#af97dee243877316b7e78ba6d56a3cd2f">Simulation::_userParams</a></div><div class="ttdeci">ControlParameters &amp; _userParams</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00123">Simulation.h:123</a></div></div>
<div class="ttc" id="class_simulation_html_a42bbc154348f2b47e6071dd346678159"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a42bbc154348f2b47e6071dd346678159">Simulation::_simLCM</a></div><div class="ttdeci">simulator_lcmt _simLCM</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00150">Simulation.h:150</a></div></div>
<div class="ttc" id="class_simulation_html_a7057f1c2d1ad690fa55fcc66a5e69b7a"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a7057f1c2d1ad690fa55fcc66a5e69b7a">Simulation::_simParams</a></div><div class="ttdeci">SimulatorControlParameters &amp; _simParams</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00122">Simulation.h:122</a></div></div>
<div class="ttc" id="_game_controller_8h_html"><div class="ttname"><a href="../../de/d5e/_game_controller_8h.html">GameController.h</a></div><div class="ttdoc">Code to read the Logitech F310 Game Controller Creates a DriverCommand object to be sent to the robot...</div></div>
<div class="ttc" id="_simulator_message_8h_html_a486e39cd4b287080b175f8736f67de4fa586d6fd9d775c897fdf1d14fbc9b0616"><div class="ttname"><a href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4fa586d6fd9d775c897fdf1d14fbc9b0616">SimulatorMode::RUN_CONTROL_PARAMETERS</a></div></div>
<div class="ttc" id="_simulator_parameters_8h_html_a5eaf6a55cc62b298e00b5dd5f02a1203"><div class="ttname"><a href="../../d2/dc1/_simulator_parameters_8h.html#a5eaf6a55cc62b298e00b5dd5f02a1203">CHEETAH_3_DEFAULT_PARAMETERS</a></div><div class="ttdeci">#define CHEETAH_3_DEFAULT_PARAMETERS</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/dc1/_simulator_parameters_8h_source.html#l00016">SimulatorParameters.h:16</a></div></div>
<div class="ttc" id="struct_spi_data_html_afc88f10c94dc79b05e984aa7ed927d8b"><div class="ttname"><a href="../../d5/d09/struct_spi_data.html#afc88f10c94dc79b05e984aa7ed927d8b">SpiData::q_abad</a></div><div class="ttdeci">float q_abad[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00035">SpineBoard.h:35</a></div></div>
<div class="ttc" id="struct_robot_homing_info_html"><div class="ttname"><a href="../../dc/d77/struct_robot_homing_info.html">RobotHomingInfo&lt; double &gt;</a></div></div>
<div class="ttc" id="class_simulation_html_a6bf59d648bef2114a09ea3d81998ee3e"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a6bf59d648bef2114a09ea3d81998ee3e">Simulation::Simulation</a></div><div class="ttdeci">EIGEN_MAKE_ALIGNED_OPERATOR_NEW Simulation(RobotType robot, Graphics3D *window, SimulatorControlParameters &amp;params, ControlParameters &amp;userParams)</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d98/_simulation_8cpp_source.html#l00018">Simulation.cpp:18</a></div></div>
<div class="ttc" id="class_simulation_html_a0965cd3e2bce1b7ee1ce3f7f6d752444"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a0965cd3e2bce1b7ee1ce3f7f6d752444">Simulation::_model</a></div><div class="ttdeci">FloatingBaseModel&lt; double &gt; _model</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00130">Simulation.h:130</a></div></div>
<div class="ttc" id="namespaceori_html_a73c3872af6870d856cedd662856fcaea"><div class="ttname"><a href="../../da/d9b/namespaceori.html#a73c3872af6870d856cedd662856fcaea">ori::rotationMatrixToQuaternion</a></div><div class="ttdeci">Quat&lt; typename T::Scalar &gt; rotationMatrixToQuaternion(const Eigen::MatrixBase&lt; T &gt; &amp;r1)</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/dfb/orientation__tools_8h_source.html#l00119">orientation_tools.h:119</a></div></div>
<div class="ttc" id="class_checkerboard_html"><div class="ttname"><a href="../../df/d89/class_checkerboard.html">Checkerboard</a></div><div class="ttdef"><b>Definition:</b> <a href="../../dd/ddf/_checkerboard_8h_source.html#l00015">Checkerboard.h:15</a></div></div>
<div class="ttc" id="_simulator_message_8h_html_a486e39cd4b287080b175f8736f67de4faa438191831f2e6bd093884da88dd374f"><div class="ttname"><a href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4faa438191831f2e6bd093884da88dd374f">SimulatorMode::RUN_CONTROLLER</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a738072d0d6a7a632be68f6261501826b"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a738072d0d6a7a632be68f6261501826b">Vec4</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 4, 1 &gt; Vec4</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00030">cppTypes.h:30</a></div></div>
<div class="ttc" id="struct_spi_data_html_acabffbc789cc4b3dbe876dadde510498"><div class="ttname"><a href="../../d5/d09/struct_spi_data.html#acabffbc789cc4b3dbe876dadde510498">SpiData::qd_abad</a></div><div class="ttdeci">float qd_abad[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00038">SpineBoard.h:38</a></div></div>
<div class="ttc" id="struct_control_parameter_response_html_ade6ee0a7cb7f80ca17ced8276ed3dac6"><div class="ttname"><a href="../../d4/d34/struct_control_parameter_response.html#ade6ee0a7cb7f80ca17ced8276ed3dac6">ControlParameterResponse::name</a></div><div class="ttdeci">char name[CONTROL_PARAMETER_MAXIMUM_NAME_LENGTH]</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00064">ControlParameterInterface.h:64</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html_a84b25acaf7edf23f4f437a96a0d8ba05"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html#a84b25acaf7edf23f4f437a96a0d8ba05">DynamicsSimulator::step</a></div><div class="ttdeci">void step(T dt, const DVec&lt; T &gt; &amp;tau, T kp, T kd)</div><div class="ttdoc">Initialize simulator with given model. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4c/_dynamics_simulator_8cpp_source.html#l00041">DynamicsSimulator.cpp:41</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39a6dd4d4322d59b92d9eaed24a8d3ecb45">RobotType::CHEETAH_3</a></div></div>
<div class="ttc" id="class_draw_list_html_a792c90bc3c128f684bd62928b24d2d38"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#a792c90bc3c128f684bd62928b24d2d38">DrawList::buildDrawList</a></div><div class="ttdeci">void buildDrawList()</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d8b/_draw_list_8cpp_source.html#l00266">DrawList.cpp:266</a></div></div>
<div class="ttc" id="struct_control_parameter_request_html_a7499c6aedd179056b9615b8c00fffb9f"><div class="ttname"><a href="../../d6/d6d/struct_control_parameter_request.html#a7499c6aedd179056b9615b8c00fffb9f">ControlParameterRequest::requestNumber</a></div><div class="ttdeci">u64 requestNumber</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00029">ControlParameterInterface.h:29</a></div></div>
<div class="ttc" id="struct_control_parameter_request_html_afcc0b006e83760030cde3ab151aca929"><div class="ttname"><a href="../../d6/d6d/struct_control_parameter_request.html#afcc0b006e83760030cde3ab151aca929">ControlParameterRequest::value</a></div><div class="ttdeci">ControlParameterValue value</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00030">ControlParameterInterface.h:30</a></div></div>
<div class="ttc" id="class_graphics3_d_html_ac7b1785526bd53f8ff17592fc838a630"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html#ac7b1785526bd53f8ff17592fc838a630">Graphics3D::getDriverCommand</a></div><div class="ttdeci">GamepadCommand &amp; getDriverCommand()</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de7/_graphics3_d_8h_source.html#l00052">Graphics3D.h:52</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html_a72892f39ed60e2f50df53ea49ffb6433"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html#a72892f39ed60e2f50df53ea49ffb6433">DynamicsSimulator::getState</a></div><div class="ttdeci">const FBModelState&lt; T &gt; &amp; getState() const </div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00074">DynamicsSimulator.h:74</a></div></div>
<div class="ttc" id="class_draw_list_html_ae3f55365bc72bedb51b835533c515861"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#ae3f55365bc72bedb51b835533c515861">DrawList::updateCheckerboard</a></div><div class="ttdeci">void updateCheckerboard(T height, size_t id)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d65/_draw_list_8h_source.html#l00229">DrawList.h:229</a></div></div>
<div class="ttc" id="struct_control_parameter_request_html_a8652e8975cfc2b0ea04e573ea7eb15e4"><div class="ttname"><a href="../../d6/d6d/struct_control_parameter_request.html#a8652e8975cfc2b0ea04e573ea7eb15e4">ControlParameterRequest::toString</a></div><div class="ttdeci">std::string toString()</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00034">ControlParameterInterface.h:34</a></div></div>
<div class="ttc" id="class_simulator_control_parameters_html"><div class="ttname"><a href="../../da/dcf/class_simulator_control_parameters.html">SimulatorControlParameters</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/dc1/_simulator_parameters_8h_source.html#l00018">SimulatorParameters.h:18</a></div></div>
<div class="ttc" id="class_simulation_html_acd45041ed9262293f92d7928342ca4da"><div class="ttname"><a href="../../dd/d14/class_simulation.html#acd45041ed9262293f92d7928342ca4da">Simulation::_controllerRobotID</a></div><div class="ttdeci">size_t _controllerRobotID</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00126">Simulation.h:126</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html_ac35ba5a30a31d439be9933947e6c806a"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html#ac35ba5a30a31d439be9933947e6c806a">DynamicsSimulator::addCollisionPlane</a></div><div class="ttdeci">void addCollisionPlane(T mu, T rest, T height)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00092">DynamicsSimulator.h:92</a></div></div>
<div class="ttc" id="class_quadruped_html_add43dcb4994e6e31375c4515e8de397d"><div class="ttname"><a href="../../dc/d66/class_quadruped.html#add43dcb4994e6e31375c4515e8de397d">Quadruped::_abadLinkLength</a></div><div class="ttdeci">T _abadLinkLength</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/dc7/_quadruped_8h_source.html#l00062">Quadruped.h:62</a></div></div>
<div class="ttc" id="class_floating_base_model_html_a5566ab4692461d4240cec1fdbc2ab948"><div class="ttname"><a href="../../d6/db1/class_floating_base_model.html#a5566ab4692461d4240cec1fdbc2ab948">FloatingBaseModel::_pGC</a></div><div class="ttdeci">vector&lt; Vec3&lt; T &gt; &gt; _pGC</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d9a/_floating_base_model_8h_source.html#l00256">FloatingBaseModel.h:256</a></div></div>
<div class="ttc" id="class_simulation_html_a496554e586e095dc468d56b61c5c6e16"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a496554e586e095dc468d56b61c5c6e16">Simulation::_desiredSimSpeed</a></div><div class="ttdeci">double _desiredSimSpeed</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00145">Simulation.h:145</a></div></div>
<div class="ttc" id="class_floating_base_model_html_abb9ab3c0c626c9f25ab122e9ffcd25d4"><div class="ttname"><a href="../../d6/db1/class_floating_base_model.html#abb9ab3c0c626c9f25ab122e9ffcd25d4">FloatingBaseModel::_footIndicesGC</a></div><div class="ttdeci">vector&lt; uint64_t &gt; _footIndicesGC</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d9a/_floating_base_model_8h_source.html#l00254">FloatingBaseModel.h:254</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html_a1dc9f92d57994e053f91b9cb619adde4"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html#a1dc9f92d57994e053f91b9cb619adde4">DynamicsSimulator::getDState</a></div><div class="ttdeci">const FBModelStateDerivative&lt; T &gt; &amp; getDState() const </div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00080">DynamicsSimulator.h:80</a></div></div>
<div class="ttc" id="class_t_i___board_control_html_a34adea65f3e6967356c8da43562bb3a9"><div class="ttname"><a href="../../d4/d1a/class_t_i___board_control.html#a34adea65f3e6967356c8da43562bb3a9">TI_BoardControl::command</a></div><div class="ttdeci">TiBoardCommand command</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00041">ti_boardcontrol.h:41</a></div></div>
<div class="ttc" id="c_types_8h_html_a3f7e2bcbb0b4c338f3c4f6c937cd4234"><div class="ttname"><a href="../../d0/d99/c_types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a></div><div class="ttdeci">uint64_t u64</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d99/c_types_8h_source.html#l00017">cTypes.h:17</a></div></div>
<div class="ttc" id="class_simulation_html_abeb2f6b890a6ecefabdba84c568899f4"><div class="ttname"><a href="../../dd/d14/class_simulation.html#abeb2f6b890a6ecefabdba84c568899f4">Simulation::_simulator</a></div><div class="ttdeci">DynamicsSimulator&lt; double &gt; * _simulator</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00133">Simulation.h:133</a></div></div>
<div class="ttc" id="struct_robot_homing_info_html_a608c91ebe844df5996d009ea349339e9"><div class="ttname"><a href="../../dc/d77/struct_robot_homing_info.html#a608c91ebe844df5996d009ea349339e9">RobotHomingInfo::active_flag</a></div><div class="ttdeci">bool active_flag</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00033">DynamicsSimulator.h:33</a></div></div>
<div class="ttc" id="cpp_types_8h_html_ae2e5a0a178a2c528d8aa939f85db7a3e"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#ae2e5a0a178a2c528d8aa939f85db7a3e">DVec</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, Eigen::Dynamic, 1 &gt; DVec</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00102">cppTypes.h:102</a></div></div>
<div class="ttc" id="class_simulation_html_ae8523a0daf2a3f08822688ee40e63fa9"><div class="ttname"><a href="../../dd/d14/class_simulation.html#ae8523a0daf2a3f08822688ee40e63fa9">Simulation::_wantStop</a></div><div class="ttdeci">bool _wantStop</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00144">Simulation.h:144</a></div></div>
<div class="ttc" id="struct_robot_homing_info_html_a3ef8244250bfc8fadc3c1b608207b190"><div class="ttname"><a href="../../dc/d77/struct_robot_homing_info.html#a3ef8244250bfc8fadc3c1b608207b190">RobotHomingInfo::kp_ang</a></div><div class="ttdeci">double kp_ang</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00031">DynamicsSimulator.h:31</a></div></div>
<div class="ttc" id="namespaceori_html"><div class="ttname"><a href="../../da/d9b/namespaceori.html">ori</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d4/dfb/orientation__tools_8h_source.html#l00028">orientation_tools.h:28</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a78d284d08fd22d809fd436256f2cbc39"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a78d284d08fd22d809fd436256f2cbc39">RobotType</a></div><div class="ttdeci">RobotType</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00120">cppTypes.h:120</a></div></div>
<div class="ttc" id="class_graphics3_d_html_ac763bf007eb93804b0350340cc6adb80"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html#ac763bf007eb93804b0350340cc6adb80">Graphics3D::lockGfxMutex</a></div><div class="ttdeci">void lockGfxMutex()</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de7/_graphics3_d_8h_source.html#l00043">Graphics3D.h:43</a></div></div>
<div class="ttc" id="class_simulation_html_a44340d99dee87ef14aaf02faa94ea3d4"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a44340d99dee87ef14aaf02faa94ea3d4">Simulation::_currentSimTime</a></div><div class="ttdeci">double _currentSimTime</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00146">Simulation.h:146</a></div></div>
<div class="ttc" id="class_simulation_html_a08195e8efa3d8d3c655bfb859b8bcdda"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a08195e8efa3d8d3c655bfb859b8bcdda">Simulation::_imuSimulator</a></div><div class="ttdeci">ImuSimulator&lt; double &gt; * _imuSimulator</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00121">Simulation.h:121</a></div></div>
<div class="ttc" id="class_draw_list_html_a551da4edf5a5774dcc79bf6e0edf2b2c"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#a551da4edf5a5774dcc79bf6e0edf2b2c">DrawList::updateAdditionalInfo</a></div><div class="ttdeci">void updateAdditionalInfo(DynamicsSimulator&lt; T &gt; &amp;model)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d65/_draw_list_8h_source.html#l00191">DrawList.h:191</a></div></div>
<div class="ttc" id="namespaceori_html_af88fa91d686c646d41f9b747a6bc90f0"><div class="ttname"><a href="../../da/d9b/namespaceori.html#af88fa91d686c646d41f9b747a6bc90f0">ori::quaternionToRotationMatrix</a></div><div class="ttdeci">Mat3&lt; typename T::Scalar &gt; quaternionToRotationMatrix(const Eigen::MatrixBase&lt; T &gt; &amp;q)</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/dfb/orientation__tools_8h_source.html#l00160">orientation_tools.h:160</a></div></div>
<div class="ttc" id="class_t_i___board_control_html_af9bf713f3d84030ef027664c9dbad07b"><div class="ttname"><a href="../../d4/d1a/class_t_i___board_control.html#af9bf713f3d84030ef027664c9dbad07b">TI_BoardControl::run_ti_board_iteration</a></div><div class="ttdeci">void run_ti_board_iteration()</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d31/ti__boardcontrol_8cpp_source.html#l00039">ti_boardcontrol.cpp:39</a></div></div>
<div class="ttc" id="struct_robot_homing_info_html_af43f44aa70884117358c840424a12ca7"><div class="ttname"><a href="../../dc/d77/struct_robot_homing_info.html#af43f44aa70884117358c840424a12ca7">RobotHomingInfo::kd_lin</a></div><div class="ttdeci">double kd_lin</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00030">DynamicsSimulator.h:30</a></div></div>
<div class="ttc" id="class_quadruped_html_a44aa07cf91c50c3d0e78821ccc620ccc"><div class="ttname"><a href="../../dc/d66/class_quadruped.html#a44aa07cf91c50c3d0e78821ccc620ccc">Quadruped::buildActuatorModels</a></div><div class="ttdeci">std::vector&lt; ActuatorModel&lt; T &gt; &gt; buildActuatorModels()</div><div class="ttdef"><b>Definition:</b> <a href="../../da/dfc/_quadruped_8cpp_source.html#l00225">Quadruped.cpp:225</a></div></div>
<div class="ttc" id="class_simulation_html_adf2d9c22a32a995bf2a8505947ca6871"><div class="ttname"><a href="../../dd/d14/class_simulation.html#adf2d9c22a32a995bf2a8505947ca6871">Simulation::_robotControllerState</a></div><div class="ttdeci">FBModelState&lt; double &gt; _robotControllerState</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00129">Simulation.h:129</a></div></div>
<div class="ttc" id="class_graphics3_d_html_a4c7364a808d197a1632386204c6eb20c"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html#a4c7364a808d197a1632386204c6eb20c">Graphics3D::unlockGfxMutex</a></div><div class="ttdeci">void unlockGfxMutex()</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de7/_graphics3_d_8h_source.html#l00045">Graphics3D.h:45</a></div></div>
<div class="ttc" id="class_imu_simulator_html"><div class="ttname"><a href="../../d8/da4/class_imu_simulator.html">ImuSimulator&lt; double &gt;</a></div></div>
<div class="ttc" id="class_control_parameters_html_a18eb23794d712e6c56120e644883e4e0"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html#a18eb23794d712e6c56120e644883e4e0">ControlParameters::initializeFromYamlFile</a></div><div class="ttdeci">void initializeFromYamlFile(const std::string &amp;path)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d90/_control_parameters_8cpp_source.html#l00365">ControlParameters.cpp:365</a></div></div>
<div class="ttc" id="struct_control_parameter_response_html"><div class="ttname"><a href="../../d4/d34/struct_control_parameter_response.html">ControlParameterResponse</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00063">ControlParameterInterface.h:63</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html_a560cb59e43a731fd2a8bb4f54b4086bd"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html#a560cb59e43a731fd2a8bb4f54b4086bd">DynamicsSimulator::getModel</a></div><div class="ttdeci">const FloatingBaseModel&lt; T &gt; &amp; getModel()</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00118">DynamicsSimulator.h:118</a></div></div>
<div class="ttc" id="struct_robot_homing_info_html_abf4040ec16284bcb4188fe19fcdbff04"><div class="ttname"><a href="../../dc/d77/struct_robot_homing_info.html#abf4040ec16284bcb4188fe19fcdbff04">RobotHomingInfo::rpy</a></div><div class="ttdeci">Vec3&lt; T &gt; rpy</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00028">DynamicsSimulator.h:28</a></div></div>
<div class="ttc" id="class_simulation_html_adee3976d5353a82874f9e793269044b7"><div class="ttname"><a href="../../dd/d14/class_simulation.html#adee3976d5353a82874f9e793269044b7">Simulation::_timeOfNextHighLevelControl</a></div><div class="ttdeci">double _timeOfNextHighLevelControl</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00148">Simulation.h:148</a></div></div>
<div class="ttc" id="class_spine_board_html_a1bb279c9df7a772f4878fba9b508cfaa"><div class="ttname"><a href="../../d1/da3/class_spine_board.html#a1bb279c9df7a772f4878fba9b508cfaa">SpineBoard::resetCommand</a></div><div class="ttdeci">void resetCommand()</div><div class="ttdef"><b>Definition:</b> <a href="../../de/d6d/_spine_board_8cpp_source.html#l00035">SpineBoard.cpp:35</a></div></div>
<div class="ttc" id="struct_ti_board_data_html_a59bdb52d482a8cf13b0eefe34760b530"><div class="ttname"><a href="../../de/de1/struct_ti_board_data.html#a59bdb52d482a8cf13b0eefe34760b530">TiBoardData::dq</a></div><div class="ttdeci">float dq[3]</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d42/ti__boardcontrol_8h_source.html#l00025">ti_boardcontrol.h:25</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a0b83d93a3c74d282558436e26c056896"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a0b83d93a3c74d282558436e26c056896">RotMat</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 3 &gt; RotMat</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00018">cppTypes.h:18</a></div></div>
<div class="ttc" id="class_simulation_html_a31364f2daa9daedef347aaff4001796c"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a31364f2daa9daedef347aaff4001796c">Simulation::sendControlParameter</a></div><div class="ttdeci">void sendControlParameter(const std::string &amp;name, ControlParameterValue value, ControlParameterValueKind kind, bool isUser)</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d98/_simulation_8cpp_source.html#l00216">Simulation.cpp:216</a></div></div>
<div class="ttc" id="struct_spi_data_html_af6aa9e4ce4989d485f2170af59bf84cf"><div class="ttname"><a href="../../d5/d09/struct_spi_data.html#af6aa9e4ce4989d485f2170af59bf84cf">SpiData::qd_hip</a></div><div class="ttdeci">float qd_hip[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00039">SpineBoard.h:39</a></div></div>
<div class="ttc" id="struct_f_b_model_state_html_ae42e1f0d68b89af761bcaf273b97bca7"><div class="ttname"><a href="../../de/d75/struct_f_b_model_state.html#ae42e1f0d68b89af761bcaf273b97bca7">FBModelState::bodyOrientation</a></div><div class="ttdeci">EIGEN_MAKE_ALIGNED_OPERATOR_NEW Quat&lt; T &gt; bodyOrientation</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d9a/_floating_base_model_8h_source.html#l00040">FloatingBaseModel.h:40</a></div></div>
<div class="ttc" id="class_control_parameters_html_a6fc860c65c6484562dfc922cb5806410"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html#a6fc860c65c6484562dfc922cb5806410">ControlParameters::generateUnitializedList</a></div><div class="ttdeci">std::string generateUnitializedList()</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d90/_control_parameters_8cpp_source.html#l00089">ControlParameters.cpp:89</a></div></div>
<div class="ttc" id="class_draw_list_html_a1df4a5846120d050f009a8736424f221"><div class="ttname"><a href="../../d1/d03/class_draw_list.html#a1df4a5846120d050f009a8736424f221">DrawList::addCheckerboard</a></div><div class="ttdeci">size_t addCheckerboard(Checkerboard &amp;checkerBoard)</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d8b/_draw_list_8cpp_source.html#l00215">DrawList.cpp:215</a></div></div>
<div class="ttc" id="class_quadruped_html_ae3725898959888f0885981c43f127a07"><div class="ttname"><a href="../../dc/d66/class_quadruped.html#ae3725898959888f0885981c43f127a07">Quadruped::buildModel</a></div><div class="ttdeci">FloatingBaseModel&lt; T &gt; buildModel()</div><div class="ttdef"><b>Definition:</b> <a href="../../da/dfc/_quadruped_8cpp_source.html#l00113">Quadruped.cpp:113</a></div></div>
<div class="ttc" id="class_graphics3_d_html_ab325796e856cbad5652d35436d48b942"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html#ab325796e856cbad5652d35436d48b942">Graphics3D::_drawList</a></div><div class="ttdeci">DrawList _drawList</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de7/_graphics3_d_8h_source.html#l00049">Graphics3D.h:49</a></div></div>
<div class="ttc" id="class_dynamics_simulator_html_aa3c1c830bfa1dc1ceed7ff95f2f437c1"><div class="ttname"><a href="../../d7/d9c/class_dynamics_simulator.html#aa3c1c830bfa1dc1ceed7ff95f2f437c1">DynamicsSimulator::addCollisionBox</a></div><div class="ttdeci">void addCollisionBox(T mu, T rest, T depth, T width, T height, const Vec3&lt; T &gt; &amp;pos, const Mat3&lt; T &gt; &amp;ori)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d52/_dynamics_simulator_8h_source.html#l00097">DynamicsSimulator.h:97</a></div></div>
<div class="ttc" id="class_simulation_html_a33a669431e116d1e6c59af5a4a4ad9bf"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a33a669431e116d1e6c59af5a4a4ad9bf">Simulation::_robotDataModel</a></div><div class="ttdeci">FloatingBaseModel&lt; double &gt; _robotDataModel</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00131">Simulation.h:131</a></div></div>
<div class="ttc" id="test__casadi_8cpp_html_ae20d7fba59865a21504b65cdb44cbfe5"><div class="ttname"><a href="../../dc/dd7/test__casadi_8cpp.html#ae20d7fba59865a21504b65cdb44cbfe5">f</a></div><div class="ttdeci">MX f(const MX &amp;x, const MX &amp;u)</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/dd7/test__casadi_8cpp_source.html#l00202">test_casadi.cpp:202</a></div></div>
<div class="ttc" id="class_graphics3_d_html_a1113a4cce78fa8cf7919afc5dda360d5"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html#a1113a4cce78fa8cf7919afc5dda360d5">Graphics3D::infoString</a></div><div class="ttdeci">char infoString[200]</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de7/_graphics3_d_8h_source.html#l00050">Graphics3D.h:50</a></div></div>
<div class="ttc" id="struct_control_parameter_request_html"><div class="ttname"><a href="../../d6/d6d/struct_control_parameter_request.html">ControlParameterRequest</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00026">ControlParameterInterface.h:26</a></div></div>
<div class="ttc" id="class_graphics3_d_html_a04e989eeebcb1478ae61ba26206a8fae"><div class="ttname"><a href="../../de/d6f/class_graphics3_d.html#a04e989eeebcb1478ae61ba26206a8fae">Graphics3D::wantTurbo</a></div><div class="ttdeci">bool wantTurbo()</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/de7/_graphics3_d_8h_source.html#l00057">Graphics3D.h:57</a></div></div>
<div class="ttc" id="class_simulation_html_a631f7ffcbbba9b636bf851093c825739"><div class="ttname"><a href="../../dd/d14/class_simulation.html#a631f7ffcbbba9b636bf851093c825739">Simulation::_lcm</a></div><div class="ttdeci">lcm::LCM * _lcm</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/ded/_simulation_8h_source.html#l00141">Simulation.h:141</a></div></div>
<div class="ttc" id="struct_spi_data_html_a97d6ab668da0a2f52b11468508b715ef"><div class="ttname"><a href="../../d5/d09/struct_spi_data.html#a97d6ab668da0a2f52b11468508b715ef">SpiData::qd_knee</a></div><div class="ttdeci">float qd_knee[4]</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d6a/_spine_board_8h_source.html#l00040">SpineBoard.h:40</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_43e0a1f539e00dcfa1a6bc4d4fee4fc2.html">home</a></li><li class="navelem"><a class="el" href="../../dir_61bfb0b3cdda81b1b0355ba34eb3b1eb.html">dhkim</a></li><li class="navelem"><a class="el" href="../../dir_adee5b101e079090017bb4e91c628ead.html">Public_Repository</a></li><li class="navelem"><a class="el" href="../../dir_7fc07a7b97001e7b1d18e11da761e2de.html">Cheetah-Software</a></li><li class="navelem"><a class="el" href="../../dir_e380f5e928ac62e3c78e1e401f2404bd.html">sim</a></li><li class="navelem"><a class="el" href="../../dir_a016bb1cae11d95bfbad53e4af068c30.html">src</a></li><li class="navelem"><a class="el" href="../../db/d98/_simulation_8cpp.html">Simulation.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
